Class: Google::Cloud::Datastore::V1::QueryResultBatch

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

Overview

A batch of results produced by a query.

Defined Under Namespace

Modules: MoreResultsType

Instance Attribute Summary collapse

Instance Attribute Details

#end_cursor::String

Returns A cursor that points to the position after the last result in the batch.

Returns:

  • (::String)

    A cursor that points to the position after the last result in the batch.



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end

#entity_result_type::Google::Cloud::Datastore::V1::EntityResult::ResultType

Returns The result type for every entity in entity_results.

Returns:



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end

#entity_results::Array<::Google::Cloud::Datastore::V1::EntityResult>

Returns The results for this batch.

Returns:



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end

#more_results::Google::Cloud::Datastore::V1::QueryResultBatch::MoreResultsType

Returns The state of the query after the current batch.

Returns:



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end

#read_time::Google::Protobuf::Timestamp

Returns Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.

Returns:

  • (::Google::Protobuf::Timestamp)

    Read timestamp this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

    In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. This value will not be set for eventually consistent queries in Cloud Datastore.



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end

#skipped_cursor::String

Returns A cursor that points to the position after the last skipped result. Will be set when skipped_results != 0.

Returns:

  • (::String)

    A cursor that points to the position after the last skipped result. Will be set when skipped_results != 0.



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end

#skipped_results::Integer

Returns The number of results skipped, typically because of an offset.

Returns:

  • (::Integer)

    The number of results skipped, typically because of an offset.



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end

#snapshot_version::Integer

Returns The version number of the snapshot this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.

Returns:

  • (::Integer)

    The version number of the snapshot this batch was returned from. This applies to the range of results from the query's start_cursor (or the beginning of the query if no cursor was given) to this batch's end_cursor (not the query's end_cursor).

    In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries.



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'proto_docs/google/datastore/v1/query.rb', line 558

class QueryResultBatch
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # The possible values for the `more_results` field.
  module MoreResultsType
    # Unspecified. This value is never used.
    MORE_RESULTS_TYPE_UNSPECIFIED = 0

    # There may be additional batches to fetch from this query.
    NOT_FINISHED = 1

    # The query is finished, but there may be more results after the limit.
    MORE_RESULTS_AFTER_LIMIT = 2

    # The query is finished, but there may be more results after the end
    # cursor.
    MORE_RESULTS_AFTER_CURSOR = 4

    # The query is finished, and there are no more results.
    NO_MORE_RESULTS = 3
  end
end