Class: Google::Cloud::Datastore::V1::Query

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/datastore/v1/query.rb

Overview

A query for entities.

Instance Attribute Summary collapse

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 in order.

Returns:

  • (::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 in order.


125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

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.

Returns:



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

class Query
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#filter::Google::Cloud::Datastore::V1::Filter

Returns The filter to apply.

Returns:



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

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.

Returns:



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

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.

Returns:

  • (::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.



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

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.

Returns:

  • (::Integer)

    The number of results to skip. Applies before limit, but after all other constraints. Optional. Must be >= 0 if specified.



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

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).

Returns:



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

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.

Returns:



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

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.

Returns:



125
126
127
128
# File 'proto_docs/google/datastore/v1/query.rb', line 125

class Query
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end