When false, the query string must not contain any literals and instead must
bind all values. For example,
SELECT * FROM Kind WHERE a = 'string literal' is not allowed, while
SELECT * FROM Kind WHERE a = @value is.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eGqlQuery\u003c/code\u003e class in the Google Cloud Datastore v1 API is version 4.15.0.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation provides reference and code samples for the \u003ccode\u003eGqlQuery\u003c/code\u003e class, which is used for GQL queries in Google Cloud Datastore.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGqlQuery\u003c/code\u003e class inherits from \u003ccode\u003eobject\u003c/code\u003e and 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\u003eThe class includes properties like \u003ccode\u003eAllowLiterals\u003c/code\u003e, \u003ccode\u003eNamedBindings\u003c/code\u003e, \u003ccode\u003ePositionalBindings\u003c/code\u003e, and \u003ccode\u003eQueryString\u003c/code\u003e, which are used to define and manage the GQL query parameters and string.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGqlQuery\u003c/code\u003e class has different versions listed from 4.15.0 to 3.2.0, each with their documentation.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class GqlQuery (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.GqlQuery)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Google.Cloud.Datastore.V1.GqlQuery)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Google.Cloud.Datastore.V1.GqlQuery) \n\n public sealed class GqlQuery : IMessage\u003cGqlQuery\u003e, IEquatable\u003cGqlQuery\u003e, IDeepCloneable\u003cGqlQuery\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Datastore v1 API class GqlQuery.\n\nA [GQL\nquery](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GqlQuery \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GqlQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.GqlQuery), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GqlQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.GqlQuery), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GqlQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.GqlQuery), [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### GqlQuery()\n\n public GqlQuery()\n\n### GqlQuery(GqlQuery)\n\n public GqlQuery(GqlQuery other)\n\nProperties\n----------\n\n### AllowLiterals\n\n public bool AllowLiterals { get; set; }\n\nWhen false, the query string must not contain any literals and instead must\nbind all values. For example,\n`SELECT * FROM Kind WHERE a = 'string literal'` is not allowed, while\n`SELECT * FROM Kind WHERE a = @value` is.\n\n### NamedBindings\n\n public MapField\u003cstring, GqlQueryParameter\u003e NamedBindings { get; }\n\nFor each non-reserved named binding site in the query string, there must be\na named parameter with that name, but not necessarily the inverse.\n\nKey must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex\n`__.*__`, and must not be `\"\"`.\n\n### PositionalBindings\n\n public RepeatedField\u003cGqlQueryParameter\u003e PositionalBindings { get; }\n\nNumbered binding site @1 references the first numbered parameter,\neffectively using 1-based indexing, rather than the usual 0.\n\nFor each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true.\n\n### QueryString\n\n public string QueryString { get; set; }\n\nA string of the format described\n[here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference)."]]