(::Boolean) — 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.
#allow_literals=
defallow_literals=(value)->::Boolean
Parameter
value (::Boolean) — 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.
Returns
(::Boolean) — 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.
(::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::GqlQueryParameter}) — For each non-reserved named binding site in the query string, there must be
a named parameter with that name, but not necessarily the inverse.
Key must match regex [A-Za-z_$][A-Za-z_$0-9]*, must not match regex
__.*__, and must not be "".
value (::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::GqlQueryParameter}) — For each non-reserved named binding site in the query string, there must be
a named parameter with that name, but not necessarily the inverse.
Key must match regex [A-Za-z_$][A-Za-z_$0-9]*, must not match regex
__.*__, and must not be "".
Returns
(::Google::Protobuf::Map{::String => ::Google::Cloud::Datastore::V1::GqlQueryParameter}) — For each non-reserved named binding site in the query string, there must be
a named parameter with that name, but not necessarily the inverse.
Key must match regex [A-Za-z_$][A-Za-z_$0-9]*, must not match regex
__.*__, and must not be "".
[[["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-09-04 UTC."],[],[],null,["# Firestore in Datastore mode V1 API - Class Google::Cloud::Datastore::V1::GqlQuery (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-GqlQuery)\n- [1.4.0](/ruby/docs/reference/google-cloud-datastore-v1/1.4.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [1.3.1](/ruby/docs/reference/google-cloud-datastore-v1/1.3.1/Google-Cloud-Datastore-V1-GqlQuery)\n- [1.2.0](/ruby/docs/reference/google-cloud-datastore-v1/1.2.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [1.1.0](/ruby/docs/reference/google-cloud-datastore-v1/1.1.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [1.0.1](/ruby/docs/reference/google-cloud-datastore-v1/1.0.1/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.19.0](/ruby/docs/reference/google-cloud-datastore-v1/0.19.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.18.0](/ruby/docs/reference/google-cloud-datastore-v1/0.18.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.17.0](/ruby/docs/reference/google-cloud-datastore-v1/0.17.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.16.3](/ruby/docs/reference/google-cloud-datastore-v1/0.16.3/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.15.0](/ruby/docs/reference/google-cloud-datastore-v1/0.15.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.14.0](/ruby/docs/reference/google-cloud-datastore-v1/0.14.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.13.1](/ruby/docs/reference/google-cloud-datastore-v1/0.13.1/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.12.0](/ruby/docs/reference/google-cloud-datastore-v1/0.12.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.11.1](/ruby/docs/reference/google-cloud-datastore-v1/0.11.1/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.10.0](/ruby/docs/reference/google-cloud-datastore-v1/0.10.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.9.0](/ruby/docs/reference/google-cloud-datastore-v1/0.9.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.8.0](/ruby/docs/reference/google-cloud-datastore-v1/0.8.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.7.0](/ruby/docs/reference/google-cloud-datastore-v1/0.7.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.6.0](/ruby/docs/reference/google-cloud-datastore-v1/0.6.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.5.0](/ruby/docs/reference/google-cloud-datastore-v1/0.5.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.4.0](/ruby/docs/reference/google-cloud-datastore-v1/0.4.0/Google-Cloud-Datastore-V1-GqlQuery)\n- [0.3.5](/ruby/docs/reference/google-cloud-datastore-v1/0.3.5/Google-Cloud-Datastore-V1-GqlQuery) \nReference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::GqlQuery.\n\nA [GQL\nquery](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #allow_literals\n\n def allow_literals() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- 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.\n\n### #allow_literals=\n\n def allow_literals=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- 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. \n**Returns**\n\n- (::Boolean) --- 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.\n\n### #named_bindings\n\n def named_bindings() -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::Datastore::V1::GqlQueryParameter}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::Datastore::V1::GqlQueryParameter}) --- For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse.\n\n Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex\n `__.*__`, and must not be `\"\"`.\n\n### #named_bindings=\n\n def named_bindings=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::Google::Cloud::Datastore::V1::GqlQueryParameter}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::Datastore::V1::GqlQueryParameter}) --- For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse.\n\n\n Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex\n`__.*__`, and must not be `\"\"`. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::Google::Cloud::Datastore::V1::GqlQueryParameter}) --- For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse.\n\n Key must match regex `[A-Za-z_$][A-Za-z_$0-9]*`, must not match regex\n `__.*__`, and must not be `\"\"`.\n\n### #positional_bindings\n\n def positional_bindings() -\u003e ::Array\u003c::Google::Cloud::Datastore::V1::GqlQueryParameter\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Datastore::V1::GqlQueryParameter](./Google-Cloud-Datastore-V1-GqlQueryParameter)\\\u003e) --- Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0.\n\n\n For each binding site numbered i in `query_string`, there must be an i-th\n numbered parameter. The inverse must also be true.\n\n### #positional_bindings=\n\n def positional_bindings=(value) -\u003e ::Array\u003c::Google::Cloud::Datastore::V1::GqlQueryParameter\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Datastore::V1::GqlQueryParameter](./Google-Cloud-Datastore-V1-GqlQueryParameter)\\\u003e) --- Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0.\n\n\n For each binding site numbered i in `query_string`, there must be an i-th\nnumbered parameter. The inverse must also be true. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Datastore::V1::GqlQueryParameter](./Google-Cloud-Datastore-V1-GqlQueryParameter)\\\u003e) --- Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0.\n\n\n For each binding site numbered i in `query_string`, there must be an i-th\n numbered parameter. The inverse must also be true.\n\n### #query_string\n\n def query_string() -\u003e ::String\n\n**Returns**\n\n- (::String) --- A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).\n\n### #query_string=\n\n def query_string=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference). \n**Returns**\n\n- (::String) --- A string of the format described [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference)."]]