- JSON representation
- Projection
- KindExpression
- Filter
- CompositeFilter
- Operator
- PropertyFilter
- Operator
- PropertyOrder
- Direction
A query for entities.
JSON representation |
---|
{ "projection": [ { object ( |
Fields | |
---|---|
projection[] |
The projection to return. Defaults to returning all properties. |
kind[] |
The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified. |
filter |
The filter to apply. |
order[] |
The order to apply to the query results (if empty, order is unspecified). |
distinctOn[] |
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). Requires:
|
startCursor |
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. A base64-encoded string. |
endCursor |
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. A base64-encoded string. |
offset |
The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified. |
limit |
The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified. |
Projection
A representation of a property in a projection.
JSON representation |
---|
{
"property": {
object ( |
Fields | |
---|---|
property |
The property to project. |
KindExpression
A representation of a kind.
JSON representation |
---|
{ "name": string } |
Fields | |
---|---|
name |
The name of the kind. |
Filter
A holder for any type of filter.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field filter_type . The type of filter. filter_type can be only one of the following: |
|
compositeFilter |
A composite filter. |
propertyFilter |
A filter on a property. |
CompositeFilter
A filter that merges multiple other filters using the given operator.
JSON representation |
---|
{ "op": enum ( |
Fields | |
---|---|
op |
The operator for combining multiple filters. |
filters[] |
The list of filters to combine. Requires:
|
Operator
A composite filter operator.
Enums | |
---|---|
OPERATOR_UNSPECIFIED |
Unspecified. This value must not be used. |
AND |
The results are required to satisfy each of the combined filters. |
OR |
Documents are required to satisfy at least one of the combined filters. |
PropertyFilter
A filter on a specific property.
JSON representation |
---|
{ "property": { object ( |
Fields | |
---|---|
property |
The property to filter by. |
op |
The operator to filter by. |
value |
The value to compare the property to. |
Operator
A property filter operator.
Enums | |
---|---|
OPERATOR_UNSPECIFIED |
Unspecified. This value must not be used. |
LESS_THAN |
The given Requires:
|
LESS_THAN_OR_EQUAL |
The given Requires:
|
GREATER_THAN |
The given Requires:
|
GREATER_THAN_OR_EQUAL |
The given Requires:
|
EQUAL |
The given property is equal to the given value . |
IN |
The given Requires:
|
NOT_EQUAL |
The given Requires:
|
HAS_ANCESTOR |
Limit the result set to the given entity and its descendants. Requires:
|
NOT_IN |
The value of the Requires:
|
PropertyOrder
The desired order for a specific property.
JSON representation |
---|
{ "property": { object ( |
Fields | |
---|---|
property |
The property to order by. |
direction |
The direction to order by. Defaults to |
Direction
The sort direction.
Enums | |
---|---|
DIRECTION_UNSPECIFIED |
Unspecified. This value must not be used. |
ASCENDING |
Ascending. |
DESCENDING |
Descending. |