Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > fa85cd649566b98d87046c221864cef2 > files > 4

apache-mod_sqil-1.0-7mdv2010.0.i586.rpm


SQIL Tags and their Attributes

SQI(nterface)L is an SQL "server page" query language for generating
XML with SQL queries. It has a parameter tag for parameter declaration, 
a bind tag to actually use the parameters,a field tag for output 
generation and an if-exists tag for conditional query parts.

    parameter
    	The values that are used in bind and if-(not-)exists tags
	have to be declared in a parameter tag beforehand.
	The tag is passed to the target document if a value
	was present. 
    	name - (req.) the parameter name 
    	type - (req.) http-get, const
        value - This is only used for const.
	
    field
    	The columes that are returned by the SELECT statement.
	This tag is replaced by the value of the name attribute
	in the SELECT.
	name - (req.) The name for the column, usually an alias.
	       The name "mtime" is special, it will cause calls to
	       update_mtime with the retrieved values.
    
    bind
    	The bind variables. Note that mod_sqil does not use 
	prepared statements by now, it replaces the tag with 
	an escaped string containing the parameter value.
	name - (req.) The name of the parameter whose value is 
	       to be used.

   statement
   	The SELECT statement enclosed by this tag is executed.
	Column values are passed in tags named as the field names.
	If the SELECt returns a NULL value, the corresponding tag
	is omitted. This makes it possible to distinguish NULL and ''.
	Note that the SELECT statement has to be XML text, so it is
	&lt; NOT <.
        rowname - (opt.) Each row is enclosed with a tag named with
	          the value of rowname if this is given.
	headname- (opt.) If this is given, the field tags are translated
		  to a list of empty tags named by the column names.
		  These are enclosed by tags named by headname.
	rownum  - (opt.) The name of an optional enumeration column.
	          It is only added if this attribute is given.
	count   - (opt.) The number of rows enclosed in a tag with the 
		  given name is added if this attribute is given.
	
    init
    	This executes an (opt.) statement, but this does not generate 
	any output. The purpose is to do a hidden query retrieving mtime
	fields (see above).
	Init also initiates generation of a 304 response, if mod_delay
	is upwards in the filter chain. So an empty init tag makes sense.