Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

AttributesSub-attributesSub-attributesDescription
id  an OPTIONAL XML ID identifying the query. If <query> is a direct child of <data> then this attribute is required.
useConfig  a REQUIRED reference to the datasource that is to be used for query.
returnGeneratedKeys  

an OPTIONAL boolean parameter to enable returnGeneratedKeys.

Set this attribute to true only in INSERT queries, where the query inserts to a table that has an auto incrementing key column. In such a case, an auto incremented key value is added to the results set.

Also see Returning Generated Keys.
param  a declaration of a parameter of the query
 name a REQUIRED name of the parameter.
 sqlType an OPTIONAL string containing a legal SQL type which defines the type of the parameter. If none is specified then defaults to string.
 paramType a REQUIRED parameter type. If none is specified then defaults to SCALAR.
 ordinal a  REQUIRED only for stored procedures which map the parameter positions with the query.
 defaultValue an OPTIONAL default value of the input parameter.
 validateCustomclassa REQUIRED custom validation class to validate the input parameter.
 validateLengthminimuma REQUIRED integer when specifying the minimum length of the parameter.
  maximuma REQUIRED integer when specifying the maximum length of the parameter.
 validatePatternpatterna REQUIRED string pattern to validate the string input parameter.
sql  a REQUIRED string containing the SQL query or SQL function to execute. See Calling an SQL Function in a Query.
 dialect an OPTIONAL string containing jdbc driver prefix when need to use sql-dialects.
sparql  a REQUIRED string containing the sparql query to execute when using RDF as datasource.
properties  an OPTIONAL XML to define advanced query properties. Each property is defined as a child element of this.
 name a REQUIRED name of the property.
result  a REQUIRED element descriibing how the table resulting from executing the query will be converted to an XML element. If any <column> or <query> child elements are present, then ONLY those are transferred as child elements of the result element (or elements, depending on whether result/@rowName is given or not). The order of the nested <column> or <query> elements defines the order of elements in the result element.
 element a REQUIRED QName which is the name of the element which will hold the results.
 rowName an OPTIONAL QName which is the name of the element wrapping each row of the result table if more than one element from the table is to be returned. If this attribute is not given, then only the first row is returned and hence no second level wrapper element is needed.
 defaultNamespace an OPTIONAL URI being the default namespace to use for the namespace name of elements and attributes that result columns are mapped to. Defaults to "" (meaning no namespace).
 call-query an OPTIONAL element (which may occur any number of times) which is used to execute a further query and produce an element which will be present in the parent element as a child. This is used primarily to use a value of a column as key to select data from a new table.
 element an OPTIONAL element (which may occur any number of times) indicating how a specific column in the result table is to be mapped into an element
  element/@namea REQUIRED QName giving the name of the element to put the column data into
  element/@columnan OPTIONAL string giving the name of the column whose value is to be copied into the element.
  element/@requiredRolesan OPTIONAL string giving the names of roles that who has permission to see the result element. By default it has set to all users.
  element/@exportan OPTIONAL name giving to the element that to be export outside of query. This feature is used with boxcarring support.
  element/@exportTypea REQUIRED parameter when using export option. Used to give the export element type whether scalar or array.
  element/@xsdTypean OPTIONAL indication of the XML Schema type of the element. If none is given defaults to the mapping of the SQL type of the result column named by @column to an XML Schema type as per [SQL XML Mapping]
 attribute an OPTIONAL element (which may occur any number of times) indicating how a specific column in the result table is to be mapped into an attribute of the element representing the current row
  attribute/@namea REQUIRED QName giving the name of the attribute to put the column data into
  attribute/@columnan OPTIONAL string giving the name of the column whose value is to be copied into the attribute. Either @column or @param is required.
  attribute/@paraman OPTIONAL string giving the name of the param whose value is to be copied into the attribute. Either @column or @param is required.
  attribute/@requiredRolesan OPTIONAL string giving the names of roles that who has permission to see the result attribute. By default it has set to all users.
  attribute/@exportan OPTIONAL name giving to the attribute that to be export outside of query. This feature is used with boxcarring support.
  attribute/@exportTypea REQUIRED parameter when using export option. Used to give the export element type whether scalar or array.
  attribute/@xsdTypean OPTIONAL indication of the XML Schema type of the attribute. If none is given defaults to the mapping of the SQL type of the result column named by @column to an XML Schema type as per [SQL XML Mapping]
 call-querry an OPTIONAL element (which may occur any number of times) indicating how a specific column in the result table is to be mapped into a query result.
  with-param/@namea REQUIRED name of the query to put the column data into
  with-param/@query-paraman OPTIONAL string giving the name of the column whose value is to be copied into the element.

...