Cloud Datastore Client - Class Cursor (1.18.1)

Reference documentation and code samples for the Cloud Datastore Client class Cursor.

Represents a Cursor value.

A cursor points to a position within a set of entities. Cloud Datastore uses Cursors for paginating query results.

Example:

use Google\Cloud\Datastore\DatastoreClient;

$datastore = new DatastoreClient();
$cursor = $datastore->cursor($cursorValue);

$query = $datastore->gqlQuery('SELECT * FROM Companies OFFSET @cursor', [
    'bindings' => [
        'cursor' => $cursor
    ]
]);

Methods

__construct

Parameter
NameDescription
cursor string|int

The cursor value.

cursor

Returns
TypeDescription
string|int