Send feedback
GqlQuery
Stay organized with collections
Save and categorize content based on your preferences.
JSON representation
{
"queryString" : string ,
"allowLiterals" : boolean ,
"namedBindings" : {
string : {
object (GqlQueryParameter
)
} ,
...
} ,
"positionalBindings" : [
{
object (GqlQueryParameter
)
}
]
}
Fields
queryString
string
A string of the format described here .
allowLiterals
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.
namedBindings
map (key: string, value: object (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 ""
.
An object containing a list of "key": value
pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }
.
positionalBindings[]
object (GqlQueryParameter
)
Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0.
For each binding site numbered i in queryString
, there must be an i-th numbered parameter. The inverse must also be true.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-08 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?