public sealed class RunQueryRequest : IMessage<RunQueryRequest>, IEquatable<RunQueryRequest>, IDeepCloneable<RunQueryRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Datastore v1 API class RunQueryRequest.
The request for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
Entities are partitioned into subsets, identified by a partition ID.
Queries are scoped to a single partition.
This partition ID is normalized with the standard default context
partition ID.
[[["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\u003eThis page provides reference documentation for the \u003ccode\u003eRunQueryRequest\u003c/code\u003e class within the Google Cloud Datastore v1 API for .NET, with version 4.15.0 being the latest.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRunQueryRequest\u003c/code\u003e is used to define the request for executing queries in Datastore, including support for GQL queries.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eRunQueryRequest\u003c/code\u003e class include \u003ccode\u003eDatabaseId\u003c/code\u003e, \u003ccode\u003eProjectId\u003c/code\u003e, \u003ccode\u003eQuery\u003c/code\u003e, \u003ccode\u003eGqlQuery\u003c/code\u003e, \u003ccode\u003ePartitionId\u003c/code\u003e, and \u003ccode\u003eReadOptions\u003c/code\u003e, which define various aspects of the query and its context.\u003c/p\u003e\n"],["\u003cp\u003eThe webpage lists previous versions of the Google.Cloud.Datastore.V1 API, going back to version 3.2.0, which can be navigated to.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class RunQueryRequest (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.RunQueryRequest)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Google.Cloud.Datastore.V1.RunQueryRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Google.Cloud.Datastore.V1.RunQueryRequest) \n\n public sealed class RunQueryRequest : IMessage\u003cRunQueryRequest\u003e, IEquatable\u003cRunQueryRequest\u003e, IDeepCloneable\u003cRunQueryRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Datastore v1 API class RunQueryRequest.\n\nThe request for \\[Datastore.RunQuery\\]\\[google.datastore.v1.Datastore.RunQuery\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RunQueryRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RunQueryRequest](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.RunQueryRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RunQueryRequest](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.RunQueryRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RunQueryRequest](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.RunQueryRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \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\nConstructors\n------------\n\n### RunQueryRequest()\n\n public RunQueryRequest()\n\n### RunQueryRequest(RunQueryRequest)\n\n public RunQueryRequest(RunQueryRequest other)\n\nProperties\n----------\n\n### DatabaseId\n\n public string DatabaseId { get; set; }\n\nThe ID of the database against which to make the request.\n\n'(default)' is not allowed; please use empty string '' to refer the default\ndatabase.\n\n### ExplainOptions\n\n public ExplainOptions ExplainOptions { get; set; }\n\nOptional. Explain options for the query. If set, additional query\nstatistics will be returned. If not, only query results will be returned.\n\n### GqlQuery\n\n public GqlQuery GqlQuery { get; set; }\n\nThe GQL query to run. This query must be a non-aggregation query.\n\n### PartitionId\n\n public PartitionId PartitionId { get; set; }\n\nEntities are partitioned into subsets, identified by a partition ID.\nQueries are scoped to a single partition.\nThis partition ID is normalized with the standard default context\npartition ID.\n\n### ProjectId\n\n public string ProjectId { get; set; }\n\nRequired. The ID of the project against which to make the request.\n\n### PropertyMask\n\n public PropertyMask PropertyMask { get; set; }\n\nThe properties to return.\nThis field must not be set for a projection query.\n\nSee\n\\[LookupRequest.property_mask\\]\\[google.datastore.v1.LookupRequest.property_mask\\].\n\n### Query\n\n public Query Query { get; set; }\n\nThe query to run.\n\n### QueryTypeCase\n\n public RunQueryRequest.QueryTypeOneofCase QueryTypeCase { get; }\n\n### ReadOptions\n\n public ReadOptions ReadOptions { get; set; }\n\nThe options for this query."]]