---
schema_version: "1"
id: fe91bb4df33a5d92a7467cf36b71c0a7702f9b115ac141e53e34783b53e85ff5
title: Interface RecordQueryResult
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-functions/functions/guide/javasdk/interfaces/java-recordqueryResult.md
canonical_url: https://developer.salesforce.com/docs/platform/functions/guide/java-recordqueryResult.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: b4d5d08930566de9e34f9764ec9f1ee75d889048c7e51bb316f1c427be9e5deb
products:
  - Salesforce Functions
---
# Interface RecordQueryResult

---

\@Immutable public interface RecordQueryResult

Represents the result of a record query.

All implementations must be immutable and therefore thread-safe.

See Also: `DataApi.query(String)`,
`DataApi.queryMore(RecordQueryResult)`

## Method Summary

| Modifier and Type                           | Method           | Description                                                            |
| ------------------------------------------- | ---------------- | ---------------------------------------------------------------------- |
| `java.util.List<RecordWithSubQueryResults>` | `getRecords()`   | Returns the list of `RecordWithSubQueryResults` in this query result.  |
| `long`                                      | `getTotalSize()` | Returns the total number of records returned by the query.             |
| `boolean`                                   | `isDone()`       | If true, no additional records can be retrieved from the query result. |

## Method Details

### isDone

boolean isDone()

If true, no additional records can be retrieved from the query result.
If false, one or more records remain to be retrieved. Use
`DataApi.queryMore(RecordQueryResult)` to receive the next batch of
records from this query result.

Returns: Boolean value indicating if there are more rows to be retrieved.

### getTotalSize

long getTotalSize()

Returns the total number of records returned by the query. This isn't
necessarily the same number of records returned by `getRecords()`.

Returns: The total number of records returned by the query. See Also:
`isDone()`

### getRecords

\@Nonnull java.util.List\<RecordWithSubQueryResults\> getRecords()

Returns the `RecordWithSubQueryResults`s in this query result. Use
`isDone()` to determine if there are additional records to be queried
with `DataApi.queryMore(RecordQueryResult)`.

Returns: The list of `RecordWithSubQueryResults` in this query result.
