Class: Google::Cloud::Datastore::Cursor

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/datastore/cursor.rb

Overview

Cursor

Cursor is a point in query results. Cursors are returned in QueryResults.

Examples:

require "google/cloud/datastore"

datastore = Google::Cloud::Datastore.new

query = datastore.query("Task").
  where("done", "=", false)

tasks = datastore.run query
tasks.cursor.to_s #=> "c2Vjb25kLXBhZ2UtY3Vyc29y"

Instance Method Summary collapse

Constructor Details

#initialize(cursor) ⇒ Cursor

Base64 encoded array of bytes



38
39
40
# File 'lib/google/cloud/datastore/cursor.rb', line 38

def initialize cursor
  @cursor = cursor
end

Instance Method Details

#to_sObject

Base64 encoded array of bytes



43
44
45
# File 'lib/google/cloud/datastore/cursor.rb', line 43

def to_s
  @cursor
end