Reference documentation and code samples for the Google Cloud Datastore v1 API class DatastoreQueryResults.
A complete set of query results, fetched and stored in memory. Results are
fetched from a LazyDatastoreQuery or AsyncLazyDatastoreQuery
until the query-specified limit or end cursor is reached, or no more results are available.
public QueryResultBatch.Types.MoreResultsType MoreResults { get; }
The condition that caused the query to complete, indicating whether more
results are available beyond the query limit or end cursor, or whether
the data has been exhausted.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eDatastoreQueryResults\u003c/code\u003e class is 4.15.0, with documentation available for versions ranging back to 3.2.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDatastoreQueryResults\u003c/code\u003e provides a complete in-memory set of query results, fetched from \u003ccode\u003eLazyDatastoreQuery\u003c/code\u003e or \u003ccode\u003eAsyncLazyDatastoreQuery\u003c/code\u003e, until the query limit or end cursor is met, or there are no more results.\u003c/p\u003e\n"],["\u003cp\u003eThis class, which inherits from \u003ccode\u003eobject\u003c/code\u003e, includes properties like \u003ccode\u003eEndCursor\u003c/code\u003e, \u003ccode\u003eEntities\u003c/code\u003e, \u003ccode\u003eMetrics\u003c/code\u003e, and \u003ccode\u003eMoreResults\u003c/code\u003e, to handle the results of the query.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEndCursor\u003c/code\u003e property provides the cursor at the end of the results, which may only be null in cases of "explain" queries, and the \u003ccode\u003eEntities\u003c/code\u003e property returns the list of entities found by the query.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMoreResults\u003c/code\u003e property indicates the condition that ended the query and if more results are available, and \u003ccode\u003eMetrics\u003c/code\u003e property offers execution and planning insights of the query, if requested.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class DatastoreQueryResults (4.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Google.Cloud.Datastore.V1.DatastoreQueryResults)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Google.Cloud.Datastore.V1.DatastoreQueryResults) \n\n public sealed class DatastoreQueryResults\n\nReference documentation and code samples for the Google Cloud Datastore v1 API class DatastoreQueryResults.\n\nA complete set of query results, fetched and stored in memory. Results are\nfetched from a [LazyDatastoreQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.LazyDatastoreQuery) or [AsyncLazyDatastoreQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AsyncLazyDatastoreQuery)\nuntil the query-specified limit or end cursor is reached, or no more results are available. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DatastoreQueryResults \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Datastore.V1](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Datastore.V1.dll\n\nProperties\n----------\n\n### EndCursor\n\n public ByteString EndCursor { get; }\n\nThe cursor at the end of the results. This will only be null for \"explain\" queries,\nwhere the query has not actually been executed.\n\n### Entities\n\n public IReadOnlyList\u003cEntity\u003e Entities { get; }\n\nThe entities returned by the query.\n\n### Metrics\n\n public ExplainMetrics Metrics { get; }\n\nThe information about planning and execution (if any) of the query. This will\nbe null if no analysis was requested.\n\n### MoreResults\n\n public QueryResultBatch.Types.MoreResultsType MoreResults { get; }\n\nThe condition that caused the query to complete, indicating whether more\nresults are available beyond the query limit or end cursor, or whether\nthe data has been exhausted."]]