Cloud Spanner V1 API - Class Google::Cloud::Spanner::V1::ChangeStreamRecord (v1.9.0)

Reference documentation and code samples for the Cloud Spanner V1 API class Google::Cloud::Spanner::V1::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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#data_change_record

def data_change_record() -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord
Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord) — Data change record describing a data change for a change stream partition.

    Note: The following fields are mutually exclusive: data_change_record, heartbeat_record, partition_start_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#data_change_record=

def data_change_record=(value) -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord
Parameter
  • value (::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord) — Data change record describing a data change for a change stream partition.

    Note: The following fields are mutually exclusive: data_change_record, heartbeat_record, partition_start_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord) — Data change record describing a data change for a change stream partition.

    Note: The following fields are mutually exclusive: data_change_record, heartbeat_record, partition_start_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#heartbeat_record

def heartbeat_record() -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord
Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord) — Heartbeat record describing a heartbeat for a change stream partition.

    Note: The following fields are mutually exclusive: heartbeat_record, data_change_record, partition_start_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#heartbeat_record=

def heartbeat_record=(value) -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord
Parameter
  • value (::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord) — Heartbeat record describing a heartbeat for a change stream partition.

    Note: The following fields are mutually exclusive: heartbeat_record, data_change_record, partition_start_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::HeartbeatRecord) — Heartbeat record describing a heartbeat for a change stream partition.

    Note: The following fields are mutually exclusive: heartbeat_record, data_change_record, partition_start_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#partition_end_record

def partition_end_record() -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord
Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord) — Partition end record describing a terminated change stream partition.

    Note: The following fields are mutually exclusive: partition_end_record, data_change_record, heartbeat_record, partition_start_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#partition_end_record=

def partition_end_record=(value) -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord
Parameter
  • value (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord) — Partition end record describing a terminated change stream partition.

    Note: The following fields are mutually exclusive: partition_end_record, data_change_record, heartbeat_record, partition_start_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEndRecord) — Partition end record describing a terminated change stream partition.

    Note: The following fields are mutually exclusive: partition_end_record, data_change_record, heartbeat_record, partition_start_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#partition_event_record

def partition_event_record() -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord
Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord) — Partition event record describing key range changes for a change stream partition.

    Note: The following fields are mutually exclusive: partition_event_record, data_change_record, heartbeat_record, partition_start_record, partition_end_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#partition_event_record=

def partition_event_record=(value) -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord
Parameter
  • value (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord) — Partition event record describing key range changes for a change stream partition.

    Note: The following fields are mutually exclusive: partition_event_record, data_change_record, heartbeat_record, partition_start_record, partition_end_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionEventRecord) — Partition event record describing key range changes for a change stream partition.

    Note: The following fields are mutually exclusive: partition_event_record, data_change_record, heartbeat_record, partition_start_record, partition_end_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#partition_start_record

def partition_start_record() -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord
Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord) — Partition start record describing a new change stream partition.

    Note: The following fields are mutually exclusive: partition_start_record, data_change_record, heartbeat_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

#partition_start_record=

def partition_start_record=(value) -> ::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord
Parameter
  • value (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord) — Partition start record describing a new change stream partition.

    Note: The following fields are mutually exclusive: partition_start_record, data_change_record, heartbeat_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Cloud::Spanner::V1::ChangeStreamRecord::PartitionStartRecord) — Partition start record describing a new change stream partition.

    Note: The following fields are mutually exclusive: partition_start_record, data_change_record, heartbeat_record, partition_end_record, partition_event_record. If a field in that set is populated, all other fields in the set will automatically be cleared.