Query.ResultSet.getRowCountIfPossible()
Signature
int getRowCountIfPossible(String resultsetName)
Description
The number of rows/results that were retrieved by the query.
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 Snapshot queries without group-by and/or order-by and all Continuous queries this count cannot be
computed and will return -1. |