The general format of a data retrieval request document looks as follows:
<queries>
tag. This is the root element of a retrieval request document. It includes the connection-pool attribute indicating the pool from which to retrieve the data. The value of the connection-pool attribute should always bepw
. The children of the<queries>
tag are the actual queries to perform. They are identified by the<free-query>
tag, which allows a free-text query.<free-query>
tag. This tag holds information on the actual query to perform. You can list several<free query>
tags under one<queries>
tag to perform in serial or parallel mode.
<queries> tag
Root element of a retrieval request document.
Attribute | Definition |
---|---|
connection-pool | Required. Holds the name of the connection-pool from which to retrieve data. Must have the value pw . |
single-connection | Optional. Indicates whether to continue to the next rowset if an error occurs. Default value is If the value is |
The <queries>
tag can have the following child, which is described in the next section:
<free-query> tag
Holds information on the actual query to perform.
Attribute | Definition |
---|---|
id | Required. Holds a string representing a unique ID for the query in this specific request. The string is attached to the query response to help identify the specific request. This attribute is especially helpful when you send queries with |
types | Optional. Indicates whether to add an attribute in the response specifying the Java type of each column, as translated from the RDBMS. For example, for Default value is |
The <free-query>
tag can have the following children, which are described in the next few sections:
<meta-data> tag
Holds guidelines for the query, such as how many rows to return, whether to skip the first n rows when building the response, or the maximum time in seconds to wait for the query to perform in the RDBMS.
Child | Definition |
---|---|
<fetch-rows> | Optional. Holds the maximum number of rows to return in the response. |
<skip-rows> | Optional. Holds the number of rows to skip before building the query. For example, if the query returns 100 rows and you are in rows six and above, you can issue the value 5 for this tag. |
<timeout> | Optional. Holds the maximum time in seconds to wait for the RDBMS to perform the query. |
<query-text> tag
Holds the actual text of the query to perform.
Attribute | Definition |
---|---|
value | Required. Holds the text of the query to perform. For example:
|
<bind-variable> tag
Holds bind variables, which are represented by ?
in Java DataBase Connectivity (JDBC). They are located according to the ordinal number of ?
in the query text.
Attribute | Definition |
---|---|
id | Required. Holds the ordinal location of the ? . The first ? is 1 , the second ? is 2 , and so on. |
type | Required. Holds the Java type of the bind variable (in lowercase). Possible types include:
|
value | Optional. Holds the value of the bind variable to replace during statement execution. |