Reference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::Query.
A query for entities.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#distinct_on
def distinct_on() -> ::Array<::Google::Cloud::Datastore::V1::PropertyReference>
-
(::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).
Requires:
- If
order
is specified, the set of distinct on properties must appear before the non-distinct on properties inorder
.
- If
#distinct_on=
def distinct_on=(value) -> ::Array<::Google::Cloud::Datastore::V1::PropertyReference>
-
value (::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).
Requires:
- If
order
is specified, the set of distinct on properties must appear before the non-distinct on properties inorder
.
- If
-
(::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).
Requires:
- If
order
is specified, the set of distinct on properties must appear before the non-distinct on properties inorder
.
- If
#end_cursor
def end_cursor() -> ::String
- (::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.
#end_cursor=
def end_cursor=(value) -> ::String
- value (::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.
- (::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.
#filter
def filter() -> ::Google::Cloud::Datastore::V1::Filter
- (::Google::Cloud::Datastore::V1::Filter) — The filter to apply.
#filter=
def filter=(value) -> ::Google::Cloud::Datastore::V1::Filter
- value (::Google::Cloud::Datastore::V1::Filter) — The filter to apply.
- (::Google::Cloud::Datastore::V1::Filter) — The filter to apply.
#kind
def kind() -> ::Array<::Google::Cloud::Datastore::V1::KindExpression>
- (::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.
#kind=
def kind=(value) -> ::Array<::Google::Cloud::Datastore::V1::KindExpression>
- value (::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.
- (::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.
#limit
def limit() -> ::Google::Protobuf::Int32Value
- (::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.
#limit=
def limit=(value) -> ::Google::Protobuf::Int32Value
- value (::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.
- (::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.
#offset
def offset() -> ::Integer
- (::Integer) — The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
#offset=
def offset=(value) -> ::Integer
- value (::Integer) — The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
- (::Integer) — The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
#order
def order() -> ::Array<::Google::Cloud::Datastore::V1::PropertyOrder>
- (::Array<::Google::Cloud::Datastore::V1::PropertyOrder>) — The order to apply to the query results (if empty, order is unspecified).
#order=
def order=(value) -> ::Array<::Google::Cloud::Datastore::V1::PropertyOrder>
- value (::Array<::Google::Cloud::Datastore::V1::PropertyOrder>) — The order to apply to the query results (if empty, order is unspecified).
- (::Array<::Google::Cloud::Datastore::V1::PropertyOrder>) — The order to apply to the query results (if empty, order is unspecified).
#projection
def projection() -> ::Array<::Google::Cloud::Datastore::V1::Projection>
- (::Array<::Google::Cloud::Datastore::V1::Projection>) — The projection to return. Defaults to returning all properties.
#projection=
def projection=(value) -> ::Array<::Google::Cloud::Datastore::V1::Projection>
- value (::Array<::Google::Cloud::Datastore::V1::Projection>) — The projection to return. Defaults to returning all properties.
- (::Array<::Google::Cloud::Datastore::V1::Projection>) — The projection to return. Defaults to returning all properties.
#start_cursor
def start_cursor() -> ::String
- (::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.
#start_cursor=
def start_cursor=(value) -> ::String
- value (::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.
- (::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.