Database.createQuery()

Signature

String createQuery(String jdbcURI, String cursorName, String resultConceptURI, String sql, int pageSize, Object requestObj)

Domain

action

Description

Opens a database cursor for the given sql query.

Parameters

NameTypeDescription
jdbcURIStringThe JDBC URI of the resource to be used for getting connection.
cursorNameStringThe name of the cursor to be opened
resultTypeURIStringThe URI of the result type which will be returned by the query it may be a "Map" type in which case a user each result set row is a Map object and a user can retrieve the column values by specifying column names as key
sqlStringThe sql query string, it can be a prepared statement query or a simple statement query.
pageSizeintThe number of concepts/records to be fetched from the database for each page
requestObjObjectIf the sql query specified is a preparedstatement query then the requestObject can be specified as a concept or a array of arguments

Returns

TypeDescription
StringThe cursor name of the cursor opened

Cautions

none