QueryResult

The query() call returns a QueryResult object, which has the following properties:

Name Type Description
queryLocator QueryLocator A specialized string, similar to ID. Used in queryMore() for retrieving subsequent sets of objects from the query results, if applicable. Represents a server-side cursor. Each user can have up to ten query cursors open at a time.
done boolean Indicates whether additional rows need to be retrieved from the query results (false) using queryMore(), or not (true). Your client application can use this value as a loop condition while iterating through the query results.
records sObject[] Array of sObjects representing individual objects of the specified object and containing data defined in the field list specified in the queryString.

For information on queries that use a GROUP BY clause, see AggregateResult.

size int Your client application can use this value to determine whether the query retrieved any rows (size > 0) or not (size = 0). Total number of rows retrieved in the query.
© Copyright 2000–2012 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.