Skip to content

pQuery.getIndexMap

Signature: pQuery.getIndexMap()

Returns: Map<String, List<Integer>> parameterMap - an unmodifiable map containing a list of indexes for each named parameter

Returns the map of indexes for each named parameter.

Note

An index is the location of the question mark ('?') parameter place holders in the parsed query. A named parameter may have multiple indexes if used more than once in the raw query. The index for the first parameter is 1, the second is 2, ...

Note

This map will be empty until one of the following functions are called: getParsedQuery callStoredProcedure doQuery doConditionQuery doSelectQuery doUpdateQuery

Parameters

None

Example

var pQuery = qie.getParameterizedQuery("select name from patient where patient_id = :id");
pQuery.setString("id", "1");
var queryResult = pQuery.doQuery(
   "EMR Database",
   false,
   false
);
/* Only works after doQuery or similar is called, prior to that it's empty */
var indexMapOfQuery = pQuery.getIndexMap();