Class: Google::Apis::DatastoreV1beta2::Query
- Inherits:
-
Object
- Object
- Google::Apis::DatastoreV1beta2::Query
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/datastore_v1beta2/classes.rb,
generated/google/apis/datastore_v1beta2/representations.rb,
generated/google/apis/datastore_v1beta2/representations.rb
Overview
A query.
Instance Attribute Summary collapse
-
#end_cursor ⇒ String
An ending point for the query results.
-
#filter ⇒ Google::Apis::DatastoreV1beta2::Filter
A holder for any type of filter.
-
#group_by ⇒ Array<Google::Apis::DatastoreV1beta2::PropertyReference>
The properties to group by (if empty, no grouping is applied to the result set) .
-
#kinds ⇒ Array<Google::Apis::DatastoreV1beta2::KindExpression>
The kinds to query (if empty, returns entities from all kinds).
-
#limit ⇒ Fixnum
The maximum number of results to return.
-
#offset ⇒ Fixnum
The number of results to skip.
-
#order ⇒ Array<Google::Apis::DatastoreV1beta2::PropertyOrder>
The order to apply to the query results (if empty, order is unspecified).
-
#projection ⇒ Array<Google::Apis::DatastoreV1beta2::PropertyExpression>
The projection to return.
-
#start_cursor ⇒ String
A starting point for the query results.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Query
constructor
A new instance of Query.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Query
Returns a new instance of Query.
872 873 874 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 872 def initialize(**args) update!(**args) end |
Instance Attribute Details
#end_cursor ⇒ String
An ending point for the query results. Optional. Query cursors are returned in
query result batches.
Corresponds to the JSON property endCursor
826 827 828 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 826 def end_cursor @end_cursor end |
#filter ⇒ Google::Apis::DatastoreV1beta2::Filter
A holder for any type of filter. Exactly one field should be specified.
Corresponds to the JSON property filter
831 832 833 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 831 def filter @filter end |
#group_by ⇒ Array<Google::Apis::DatastoreV1beta2::PropertyReference>
The properties to group by (if empty, no grouping is applied to the result set)
.
Corresponds to the JSON property groupBy
837 838 839 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 837 def group_by @group_by end |
#kinds ⇒ Array<Google::Apis::DatastoreV1beta2::KindExpression>
The kinds to query (if empty, returns entities from all kinds).
Corresponds to the JSON property kinds
842 843 844 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 842 def kinds @kinds end |
#limit ⇒ Fixnum
The maximum number of results to return. Applies after all other constraints.
Optional.
Corresponds to the JSON property limit
848 849 850 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 848 def limit @limit end |
#offset ⇒ Fixnum
The number of results to skip. Applies before limit, but after all other
constraints (optional, defaults to 0).
Corresponds to the JSON property offset
854 855 856 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 854 def offset @offset end |
#order ⇒ Array<Google::Apis::DatastoreV1beta2::PropertyOrder>
The order to apply to the query results (if empty, order is unspecified).
Corresponds to the JSON property order
859 860 861 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 859 def order @order end |
#projection ⇒ Array<Google::Apis::DatastoreV1beta2::PropertyExpression>
The projection to return. If not set the entire entity is returned.
Corresponds to the JSON property projection
864 865 866 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 864 def projection @projection end |
#start_cursor ⇒ String
A starting point for the query results. Optional. Query cursors are returned
in query result batches.
Corresponds to the JSON property startCursor
870 871 872 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 870 def start_cursor @start_cursor end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
877 878 879 880 881 882 883 884 885 886 887 |
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 877 def update!(**args) @end_cursor = args[:end_cursor] if args.key?(:end_cursor) @filter = args[:filter] if args.key?(:filter) @group_by = args[:group_by] if args.key?(:group_by) @kinds = args[:kinds] if args.key?(:kinds) @limit = args[:limit] if args.key?(:limit) @offset = args[:offset] if args.key?(:offset) @order = args[:order] if args.key?(:order) @projection = args[:projection] if args.key?(:projection) @start_cursor = args[:start_cursor] if args.key?(:start_cursor) end |