Cloud Datastore Client - Class Cursor (2.0.0-RC1)

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
 ]
]);

Namespace

Google \ Cloud \ Datastore

Methods

__construct

Parameter
Name Description
cursor string|int

The cursor value.

cursor

Returns
Type Description
string|int

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.