Cloud Spanner Client - Class Snapshot (1.83.0)

Reference documentation and code samples for the Cloud Spanner Client class Snapshot.

Read-only snapshot Transaction.

For full usage details, please refer to Google\Cloud\Spanner\Database::snapshot().

Example:

use Google\Cloud\Spanner\SpannerClient;

$spanner = new SpannerClient();

$database = $spanner->connect('my-instance', 'my-database');
$transaction = $database->snapshot();

Namespace

Google \ Cloud \ Spanner

Methods

__construct

Parameters
Name Description
operation Google\Cloud\Spanner\Operation

The Operation instance.

session Google\Cloud\Spanner\Session\Session

The session to use for spanner interactions.

options array

Configuration Options.

โ†ณ id string

The Transaction ID. If no ID is provided, the Transaction will be a Single-Use Transaction.

โ†ณ readTimestamp Timestamp

The read timestamp.

โ†ณ directedReadOptions array

Directed read options. Google\Cloud\Spanner\V1\DirectedReadOptions If using the replicaSelection::type setting, utilize the constants available in Google\Cloud\Spanner\V1\DirectedReadOptions\ReplicaSelection\Type to set a value.