Class: Google::Cloud::Datastore::V1::Query
- Inherits:
-
Object
- Object
- Google::Cloud::Datastore::V1::Query
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/datastore/v1/query.rb
Overview
A query for entities.
The query stages are executed in the following order:
- kind
- filter
- projection
- order + start_cursor + end_cursor
- offset
- limit
- find_nearest
Instance Attribute Summary collapse
-
#distinct_on ⇒ ::Array<::Google::Cloud::Datastore::V1::PropertyReference>
The properties to make distinct.
-
#end_cursor ⇒ ::String
An ending point for the query results.
-
#filter ⇒ ::Google::Cloud::Datastore::V1::Filter
The filter to apply.
-
#find_nearest ⇒ ::Google::Cloud::Datastore::V1::FindNearest
Optional.
-
#kind ⇒ ::Array<::Google::Cloud::Datastore::V1::KindExpression>
The kinds to query (if empty, returns entities of all kinds).
-
#limit ⇒ ::Google::Protobuf::Int32Value
The maximum number of results to return.
-
#offset ⇒ ::Integer
The number of results to skip.
-
#order ⇒ ::Array<::Google::Cloud::Datastore::V1::PropertyOrder>
The order to apply to the query results (if empty, order is unspecified).
-
#projection ⇒ ::Array<::Google::Cloud::Datastore::V1::Projection>
The projection to return.
-
#start_cursor ⇒ ::String
A starting point for the query results.
Instance Attribute Details
#distinct_on ⇒ ::Array<::Google::Cloud::Datastore::V1::PropertyReference>
Returns 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
.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#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.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#filter ⇒ ::Google::Cloud::Datastore::V1::Filter
Returns The filter to apply.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#find_nearest ⇒ ::Google::Cloud::Datastore::V1::FindNearest
Returns Optional. A potential Nearest Neighbors Search.
Applies after all other filters and ordering.
Finds the closest vector embeddings to the given query vector.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#kind ⇒ ::Array<::Google::Cloud::Datastore::V1::KindExpression>
Returns The kinds to query (if empty, returns entities of all kinds). Currently at most 1 kind may be specified.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#limit ⇒ ::Google::Protobuf::Int32Value
Returns The maximum number of results to return. Applies after all other constraints. Optional. Unspecified is interpreted as no limit. Must be >= 0 if specified.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#offset ⇒ ::Integer
Returns The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#order ⇒ ::Array<::Google::Cloud::Datastore::V1::PropertyOrder>
Returns The order to apply to the query results (if empty, order is unspecified).
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#projection ⇒ ::Array<::Google::Cloud::Datastore::V1::Projection>
Returns The projection to return. Defaults to returning all properties.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |
#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.
141 142 143 144 |
# File 'proto_docs/google/datastore/v1/query.rb', line 141 class Query include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end |