Class: Google::Apis::DatastoreV1beta2::Query

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

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_cursorString

An ending point for the query results. Optional. Query cursors are returned in query result batches. Corresponds to the JSON property endCursor

Returns:

  • (String)


826
827
828
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 826

def end_cursor
  @end_cursor
end

#filterGoogle::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_byArray<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

#kindsArray<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

#limitFixnum

The maximum number of results to return. Applies after all other constraints. Optional. Corresponds to the JSON property limit

Returns:

  • (Fixnum)


848
849
850
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 848

def limit
  @limit
end

#offsetFixnum

The number of results to skip. Applies before limit, but after all other constraints (optional, defaults to 0). Corresponds to the JSON property offset

Returns:

  • (Fixnum)


854
855
856
# File 'generated/google/apis/datastore_v1beta2/classes.rb', line 854

def offset
  @offset
end

#orderArray<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

#projectionArray<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_cursorString

A starting point for the query results. Optional. Query cursors are returned in query result batches. Corresponds to the JSON property startCursor

Returns:

  • (String)


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