![]()
|
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
">ZOOM::resultSetA ZOOM::resultSet object represents a set of records identified by a query that has been executed against a particular connection. The sole purpose of both connection and query objects is that they can be used to create new resultSets - that is, to perform a search on the server on the remote end of the connection. The class has this declaration:
New resultSets are created by the constructor, which is passed a connection, indicating the server on which the search is to be performed, and a query, indicating what search to perform. If the search fails - for example, because the query uses attributes that the server doesn't implement - then an exception is thrown. Like connections, resultSet objects can carry name-value options. The special options which affect ZOOM-C++'s behaviour are the same as those for ZOOM-C and are described in its documentation (link below). In particular, the preferredRecordSyntax option may be set to a string such as ``USMARC'', ``SUTRS'' etc. to indicate what the format in which records should be retrieved; and the elementSetName option indicates whether brief records (``B''), full records (``F'') or some other composition should be used. The size() method returns the number of records in the result set. Zero is a legitimate value: a search that finds no records is not the same as a search that fails. Finally, the getRecord method returns the ith record from the result set, where i is zero-based: that is, legitmate values range from zero up to one less than the result-set size. If the method fails, for example because the requested record is out of range, it throws an exception. |