Reference documentation and code samples for the Cloud Datastore V1 Client class GqlQuery.
A GQL query .
Generated from protobuf message google.datastore.v1.GqlQuery
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ query_string
↳ allow_literals
bool
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.
↳ named_bindings
array|Google\Protobuf\Internal\MapField
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 ""
.
↳ positional_bindings
array< Google\Cloud\Datastore\V1\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 query_string
, there must be an i-th numbered parameter. The inverse must also be true.
getQueryString
A string of the format described here .
Generated from protobuf field string query_string = 1;
string
setQueryString
A string of the format described here .
Generated from protobuf field string query_string = 1;
var
string
$this
getAllowLiterals
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.
Generated from protobuf field bool allow_literals = 2;
bool
setAllowLiterals
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.
Generated from protobuf field bool allow_literals = 2;
var
bool
$this
getNamedBindings
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 ""
.
Generated from protobuf field map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;
Google\Protobuf\Internal\MapField
setNamedBindings
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 ""
.
Generated from protobuf field map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;
var
array|Google\Protobuf\Internal\MapField
$this
getPositionalBindings
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 query_string
, there must be an i-th
numbered parameter. The inverse must also be true.
Generated from protobuf field repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;
Google\Protobuf\Internal\RepeatedField
setPositionalBindings
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 query_string
, there must be an i-th
numbered parameter. The inverse must also be true.
Generated from protobuf field repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;
$this