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 be pw. 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.

AttributeDefinition
connection-poolRequired. 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 TRUE, which means that each query is performed in parallel using different connections. This grants a better performance when running multiple queries.

If the value is FALSE, all queries are performed in serial mode using the same connection. This way, multiple related updates can be performed on a given order.

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.

AttributeDefinition
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 single-connection=false attribute, which performs the queries in parallel. In this case, the query that ends first writes its response first, causing the responses to have a different order than the retrieve requests.

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 VARCHAR/VARCHAR2, the type returned is String. 

Default value is FALSE.

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.

ChildDefinition
<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.

AttributeDefinition
value

Required. Holds the text of the query to perform. For example:

<query-text value="select * from pse_pwqi_general_information"/>

<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.

AttributeDefinition
idRequired. 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:

  • INTEGER
  • IDENTITY
  • DECIMAL
  • FLOAT
  • BOOLEAN
  • CHAR
  • VARCHAR
  • UNIQUE INTEGER
  • TIMESTAMP
  • VARBINARY
valueOptional. Holds the value of the bind variable to replace during statement execution.
IDERA |  Products | Purchase | Support |  Community |  Resources |  About Us  | Legal