Result set tokens
A result set token is a reference to a set of results from a single statistics C API function call.
If a statistics C API function calculates a set of data, the function
provides a reference to the result set. This reference is called a
result set token. The result set can contain either:
- ID data, including statistical group IDs or statistical IDs
- Statistical data
An ID data type
is populated by the getFirstId and getNextId functions. A Statistical data type is populated
by the getFirstStat and getNextStat functions.
The data types are used to access the data in the result sets, as
described in Correlating results and error checking.
Note: All
ID data and statistical data is in character format, using the default
native string encoding.
Result set tokens returned
by a statistics C API function are 'owned' by the C API. The token
is freed when either:
- The associated Gateway daemon connection is closed using the closeGatewayConnection function.
- The function closeAllGatewayConnections is called.
Result set tokens 'owned' by the C API cannot be 'freed' using the freeResultSet function. The tokens must be freed using the closeGatewayConnection or closeAllGatewayConnections functions.
Result sets which are C API-owned can only be manipulated on the thread which obtained them. Result sets that were not created by C API calls can be manipulated by any thread.