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"

gcloud = Google::Cloud.new
datastore = gcloud.datastore

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

tasks = datastore.run query
tasks.cursor #=> Cursor

Instance Method Summary collapse

Constructor Details

#initialize(cursor) ⇒ Cursor

Base64 encoded array of bytes



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

def initialize cursor
  @cursor = cursor
end

Instance Method Details

#to_sObject

Base64 encoded array of bytes



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

def to_s
  @cursor
end