Cloud Spanner V1 Client - Class ChangeStreamRecord (2.0.0-RC1)

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

Spanner Change Streams enable customers to capture and stream out changes to their Spanner databases in real-time. A change stream can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or partition_mode='MUTABLE_KEY_RANGE'.

This message is only used in Change Streams created with the option partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special Table-Valued Function (TVF) along with each Change Streams. The function provides access to the change stream's records. The function is named READ_<change_stream_name> (where <change_stream_name> is the name of the change stream), and it returns a table with only one column called ChangeRecord.

Generated from protobuf message google.spanner.v1.ChangeStreamRecord

Namespace

Google \ Cloud \ Spanner \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ data_change_record ChangeStreamRecord\DataChangeRecord

Data change record describing a data change for a change stream partition.

↳ heartbeat_record ChangeStreamRecord\HeartbeatRecord

Heartbeat record describing a heartbeat for a change stream partition.

↳ partition_start_record ChangeStreamRecord\PartitionStartRecord

Partition start record describing a new change stream partition.

↳ partition_end_record ChangeStreamRecord\PartitionEndRecord

Partition end record describing a terminated change stream partition.

↳ partition_event_record ChangeStreamRecord\PartitionEventRecord

Partition event record describing key range changes for a change stream partition.

getDataChangeRecord

Data change record describing a data change for a change stream partition.

Returns
Type Description
ChangeStreamRecord\DataChangeRecord|null

hasDataChangeRecord

setDataChangeRecord

Data change record describing a data change for a change stream partition.

Parameter
Name Description
var ChangeStreamRecord\DataChangeRecord
Returns
Type Description
$this

getHeartbeatRecord

Heartbeat record describing a heartbeat for a change stream partition.

Returns
Type Description
ChangeStreamRecord\HeartbeatRecord|null

hasHeartbeatRecord

setHeartbeatRecord

Heartbeat record describing a heartbeat for a change stream partition.

Parameter
Name Description
var ChangeStreamRecord\HeartbeatRecord
Returns
Type Description
$this

getPartitionStartRecord

Partition start record describing a new change stream partition.

Returns
Type Description
ChangeStreamRecord\PartitionStartRecord|null

hasPartitionStartRecord

setPartitionStartRecord

Partition start record describing a new change stream partition.

Parameter
Name Description
var ChangeStreamRecord\PartitionStartRecord
Returns
Type Description
$this

getPartitionEndRecord

Partition end record describing a terminated change stream partition.

Returns
Type Description
ChangeStreamRecord\PartitionEndRecord|null

hasPartitionEndRecord

setPartitionEndRecord

Partition end record describing a terminated change stream partition.

Parameter
Name Description
var ChangeStreamRecord\PartitionEndRecord
Returns
Type Description
$this

getPartitionEventRecord

Partition event record describing key range changes for a change stream partition.

Returns
Type Description
ChangeStreamRecord\PartitionEventRecord|null

hasPartitionEventRecord

setPartitionEventRecord

Partition event record describing key range changes for a change stream partition.

Parameter
Name Description
var ChangeStreamRecord\PartitionEventRecord
Returns
Type Description
$this

getRecord

Returns
Type Description
string