TransactionOptions_ReadOnly
class TransactionOptions_ReadOnly extends Message
Options for read-only transactions.
Protobuf type Google\Spanner\V1\TransactionOptions\ReadOnly
Properties
protected | $timestamp_bound |
Methods
No description
Read at a timestamp where all previously committed transactions are visible.
Read at a timestamp where all previously committed transactions are visible.
Executes all reads at a timestamp >= min_read_timestamp
.
Read data at a timestamp >= NOW - max_staleness
seconds. Guarantees that all writes that have committed more
than the specified number of seconds ago are visible. Because
Cloud Spanner chooses the exact timestamp, this mode works even if
the client's local clock is substantially skewed from Cloud Spanner
commit timestamps.
Read data at a timestamp >= NOW - max_staleness
seconds. Guarantees that all writes that have committed more
than the specified number of seconds ago are visible. Because
Cloud Spanner chooses the exact timestamp, this mode works even if
the client's local clock is substantially skewed from Cloud Spanner
commit timestamps.
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline.
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline.
Executes all reads at a timestamp that is exact_staleness
old. The timestamp is chosen soon after the read is started.
Executes all reads at a timestamp that is exact_staleness
old. The timestamp is chosen soon after the read is started.
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
No description
Details
at line 27
__construct()
at line 39
bool
getStrong()
Read at a timestamp where all previously committed transactions are visible.
Generated from protobuf field bool strong = 1;
at line 51
setStrong(bool $var)
Read at a timestamp where all previously committed transactions are visible.
Generated from protobuf field bool strong = 1;
at line 67
Timestamp
getMinReadTimestamp()
Executes all reads at a timestamp >= min_read_timestamp
.
This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions.
Generated from protobuf field .google.protobuf.Timestamp min_read_timestamp = 2;
at line 82
setMinReadTimestamp(Timestamp $var)
Executes all reads at a timestamp >= min_read_timestamp
.
This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions.
Generated from protobuf field .google.protobuf.Timestamp min_read_timestamp = 2;
at line 104
Duration
getMaxStaleness()
Read data at a timestamp >= NOW - max_staleness
seconds. Guarantees that all writes that have committed more
than the specified number of seconds ago are visible. Because
Cloud Spanner chooses the exact timestamp, this mode works even if
the client's local clock is substantially skewed from Cloud Spanner
commit timestamps.
Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
Generated from protobuf field .google.protobuf.Duration max_staleness = 3;
at line 125
setMaxStaleness(Duration $var)
Read data at a timestamp >= NOW - max_staleness
seconds. Guarantees that all writes that have committed more
than the specified number of seconds ago are visible. Because
Cloud Spanner chooses the exact timestamp, this mode works even if
the client's local clock is substantially skewed from Cloud Spanner
commit timestamps.
Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.
Generated from protobuf field .google.protobuf.Duration max_staleness = 3;
at line 144
Timestamp
getReadTimestamp()
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline.
Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data.
Generated from protobuf field .google.protobuf.Timestamp read_timestamp = 4;
at line 162
setReadTimestamp(Timestamp $var)
Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline.
Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data.
Generated from protobuf field .google.protobuf.Timestamp read_timestamp = 4;
at line 182
Duration
getExactStaleness()
Executes all reads at a timestamp that is exact_staleness
old. The timestamp is chosen soon after the read is started.
Guarantees that all writes that have committed more than the
specified number of seconds ago are visible. Because Cloud Spanner
chooses the exact timestamp, this mode works even if the client's
local clock is substantially skewed from Cloud Spanner commit
timestamps.
Useful for reading at nearby replicas without the distributed
timestamp negotiation overhead of max_staleness
.
Generated from protobuf field .google.protobuf.Duration exact_staleness = 5;
at line 201
setExactStaleness(Duration $var)
Executes all reads at a timestamp that is exact_staleness
old. The timestamp is chosen soon after the read is started.
Guarantees that all writes that have committed more than the
specified number of seconds ago are visible. Because Cloud Spanner
chooses the exact timestamp, this mode works even if the client's
local clock is substantially skewed from Cloud Spanner commit
timestamps.
Useful for reading at nearby replicas without the distributed
timestamp negotiation overhead of max_staleness
.
Generated from protobuf field .google.protobuf.Duration exact_staleness = 5;
at line 214
bool
getReturnReadTimestamp()
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
Generated from protobuf field bool return_read_timestamp = 6;
at line 226
setReturnReadTimestamp(bool $var)
If true, the Cloud Spanner-selected read timestamp is included in the [Transaction][google.spanner.v1.Transaction] message that describes the transaction.
Generated from protobuf field bool return_read_timestamp = 6;