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

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/datastore/v1/doc/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_cursorString

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.



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 270

class QueryResultBatch
  # 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 has been exhausted.
    NO_MORE_RESULTS = 3
  end
end

#entity_result_typeGoogle::Datastore::V1::EntityResult::ResultType

Returns The result type for every entity in +entity_results+.

Returns:



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 270

class QueryResultBatch
  # 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 has been exhausted.
    NO_MORE_RESULTS = 3
  end
end

#entity_resultsArray<Google::Datastore::V1::EntityResult>

Returns The results for this batch.

Returns:



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 270

class QueryResultBatch
  # 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 has been exhausted.
    NO_MORE_RESULTS = 3
  end
end

#more_resultsGoogle::Datastore::V1::QueryResultBatch::MoreResultsType

Returns The state of the query after the current batch.

Returns:



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 270

class QueryResultBatch
  # 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 has been exhausted.
    NO_MORE_RESULTS = 3
  end
end

#skipped_cursorString

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.



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 270

class QueryResultBatch
  # 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 has been exhausted.
    NO_MORE_RESULTS = 3
  end
end

#skipped_resultsInteger

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

Returns:

  • (Integer)

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



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 270

class QueryResultBatch
  # 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 has been exhausted.
    NO_MORE_RESULTS = 3
  end
end

#snapshot_versionInteger

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.

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.



270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 270

class QueryResultBatch
  # 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 has been exhausted.
    NO_MORE_RESULTS = 3
  end
end