$Id: SQIL.txt 30 2009-09-27 19:43:29Z jo $ 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. null - (opt., default omit) omit, empty. If the SELECT returns a NULL value, the corresponding tag is omitted by default. This makes it possible to distinguish NULL and ''. If the value is "empty", an empty tag with the attribute null="true" is inserted instead. 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. Note that the SELECT statement has to be XML text, so it is < 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. if-(not-)exists The content of the tag is not removed only if the parameter referenced by name is (not) given. name - (req.) The name of the parameter whose value is referenced.