Reference documentation and code samples for the Cloud Datastore V1 Client class Query.
A query for entities.
Generated from protobuf message google.datastore.v1.Query
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ projection
array< Google\Cloud\Datastore\V1\Projection
>
The projection to return. Defaults to returning all properties.
↳ kind
array< Google\Cloud\Datastore\V1\KindExpression
>
The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified.
↳ filter
↳ order
array< Google\Cloud\Datastore\V1\PropertyOrder
>
The order to apply to the query results (if empty, order is unspecified).
↳ distinct_on
array< Google\Cloud\Datastore\V1\PropertyReference
>
The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned).
↳ start_cursor
string
A starting point for the query results. Query cursors are returned in query result batches and can only be used to continue the same query .
↳ end_cursor
string
An ending point for the query results. Query cursors are returned in query result batches and can only be used to limit the same query .
↳ offset
int
The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
↳ limit
Google\Protobuf\Int32Value
The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
getProjection
The projection to return. Defaults to returning all properties.
Generated from protobuf field repeated .google.datastore.v1.Projection projection = 2;
Google\Protobuf\Internal\RepeatedField
setProjection
The projection to return. Defaults to returning all properties.
Generated from protobuf field repeated .google.datastore.v1.Projection projection = 2;
$this
getKind
The kinds to query (if empty, returns entities of all kinds).
Currently at most 1 kind may be specified.
Generated from protobuf field repeated .google.datastore.v1.KindExpression kind = 3;
Google\Protobuf\Internal\RepeatedField
setKind
The kinds to query (if empty, returns entities of all kinds).
Currently at most 1 kind may be specified.
Generated from protobuf field repeated .google.datastore.v1.KindExpression kind = 3;
$this
getFilter
The filter to apply.
Generated from protobuf field .google.datastore.v1.Filter filter = 4;
hasFilter
clearFilter
setFilter
The filter to apply.
Generated from protobuf field .google.datastore.v1.Filter filter = 4;
$this
getOrder
The order to apply to the query results (if empty, order is unspecified).
Generated from protobuf field repeated .google.datastore.v1.PropertyOrder order = 5;
Google\Protobuf\Internal\RepeatedField
setOrder
The order to apply to the query results (if empty, order is unspecified).
Generated from protobuf field repeated .google.datastore.v1.PropertyOrder order = 5;
$this
getDistinctOn
The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned).
Generated from protobuf field repeated .google.datastore.v1.PropertyReference distinct_on = 6;
Google\Protobuf\Internal\RepeatedField
setDistinctOn
The properties to make distinct. The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned).
Generated from protobuf field repeated .google.datastore.v1.PropertyReference distinct_on = 6;
$this
getStartCursor
A starting point for the query results. Query cursors are returned in query result batches and can only be used to continue the same query .
Generated from protobuf field bytes start_cursor = 7;
string
setStartCursor
A starting point for the query results. Query cursors are returned in query result batches and can only be used to continue the same query .
Generated from protobuf field bytes start_cursor = 7;
var
string
$this
getEndCursor
An ending point for the query results. Query cursors are returned in query result batches and can only be used to limit the same query .
Generated from protobuf field bytes end_cursor = 8;
string
setEndCursor
An ending point for the query results. Query cursors are returned in query result batches and can only be used to limit the same query .
Generated from protobuf field bytes end_cursor = 8;
var
string
$this
getOffset
The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
Generated from protobuf field int32 offset = 10;
int
setOffset
The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
Generated from protobuf field int32 offset = 10;
var
int
$this
getLimit
The maximum number of results to return. Applies after all other constraints. Optional.
Unspecified is interpreted as no limit. Must be >= 0 if specified.
Generated from protobuf field .google.protobuf.Int32Value limit = 12;
Google\Protobuf\Int32Value|null
hasLimit
clearLimit
getLimitValue
Returns the unboxed value from getLimit()
The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
Generated from protobuf field .google.protobuf.Int32Value limit = 12;
int|null
setLimit
The maximum number of results to return. Applies after all other constraints. Optional.
Unspecified is interpreted as no limit. Must be >= 0 if specified.
Generated from protobuf field .google.protobuf.Int32Value limit = 12;
var
Google\Protobuf\Int32Value
$this
setLimitValue
Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object.
The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
Generated from protobuf field .google.protobuf.Int32Value limit = 12;
var
int|null
$this