Query.ResultSet.getRowCountIfPossible()
Signature
Object get(String resultsetName, int index)
Description
Gets the value of the column at the given index.
Parameters
Name | Type | Description |
resultsetName | String | name of the result set. |
Returns
Type | Description |
int | The number of rows/results that were retrieved by the query, if all the results are
retrieved as soon as the query is executed by the engine (>= 0). Otherwise returns -1.
For a query like - select cust from /Customer as cust where cust.age = 100, the Query
Engine does not know how many rows there are going to be in the result set because it
immediately starts filtering and feeding the results from the Cache to the
ResultSet/user without even knowing when it will end.
For most Snapshot queries and all Continuous queries this count cannot be computed
and will have to return -1. |