Google Cloud Spanner v1 API - Class ChangeStreamRecord.Types.DataChangeRecord (5.12.0)

public sealed class ChangeStreamRecord.Types.DataChangeRecord : IMessage<ChangeStreamRecord.Types.DataChangeRecord>, IEquatable<ChangeStreamRecord.Types.DataChangeRecord>, IDeepCloneable<ChangeStreamRecord.Types.DataChangeRecord>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Spanner v1 API class ChangeStreamRecord.Types.DataChangeRecord.

A data change record contains a set of changes to a table with the same modification type (insert, update, or delete) committed at the same commit timestamp in one change stream partition for the same transaction. Multiple data change records can be returned for the same transaction across multiple change stream partitions.

Inheritance

object > ChangeStreamRecord.Types.DataChangeRecord

Namespace

Google.Cloud.Spanner.V1

Assembly

Google.Cloud.Spanner.V1.dll

Constructors

DataChangeRecord()

public DataChangeRecord()

DataChangeRecord(DataChangeRecord)

public DataChangeRecord(ChangeStreamRecord.Types.DataChangeRecord other)
Parameter
Name Description
other ChangeStreamRecordTypesDataChangeRecord

Properties

ColumnMetadata

public RepeatedField<ChangeStreamRecord.Types.DataChangeRecord.Types.ColumnMetadata> ColumnMetadata { get; }

Provides metadata describing the columns associated with the [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed below.

Property Value
Type Description
RepeatedFieldChangeStreamRecordTypesDataChangeRecordTypesColumnMetadata

CommitTimestamp

public Timestamp CommitTimestamp { get; set; }

Indicates the timestamp in which the change was committed. DataChangeRecord.commit_timestamps, PartitionStartRecord.start_timestamps, PartitionEventRecord.commit_timestamps, and PartitionEndRecord.end_timestamps can have the same value in the same partition.

Property Value
Type Description
Timestamp

IsLastRecordInTransactionInPartition

public bool IsLastRecordInTransactionInPartition { get; set; }

Indicates whether this is the last record for a transaction in the current partition. Clients can use this field to determine when all records for a transaction in the current partition have been received.

Property Value
Type Description
bool

IsSystemTransaction

public bool IsSystemTransaction { get; set; }

Indicates whether the transaction is a system transaction. System transactions include those issued by time-to-live (TTL), column backfill, etc.

Property Value
Type Description
bool

ModType

public ChangeStreamRecord.Types.DataChangeRecord.Types.ModType ModType { get; set; }

Describes the type of change.

Property Value
Type Description
ChangeStreamRecordTypesDataChangeRecordTypesModType

Mods

public RepeatedField<ChangeStreamRecord.Types.DataChangeRecord.Types.Mod> Mods { get; }

Describes the changes that were made.

Property Value
Type Description
RepeatedFieldChangeStreamRecordTypesDataChangeRecordTypesMod

NumberOfPartitionsInTransaction

public int NumberOfPartitionsInTransaction { get; set; }

Indicates the number of partitions that return data change records for this transaction. This value can be helpful in assembling all records associated with a particular transaction.

Property Value
Type Description
int

NumberOfRecordsInTransaction

public int NumberOfRecordsInTransaction { get; set; }

Indicates the number of data change records that are part of this transaction across all change stream partitions. This value can be used to assemble all the records associated with a particular transaction.

Property Value
Type Description
int

RecordSequence

public string RecordSequence { get; set; }

Record sequence numbers are unique and monotonically increasing (but not necessarily contiguous) for a specific timestamp across record types in the same partition. To guarantee ordered processing, the reader should process records (of potentially different types) in record_sequence order for a specific timestamp in the same partition.

The record sequence number ordering across partitions is only meaningful in the context of a specific transaction. Record sequence numbers are unique across partitions for a specific transaction. Sort the DataChangeRecords for the same [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] by [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] to reconstruct the ordering of the changes within the transaction.

Property Value
Type Description
string

ServerTransactionId

public string ServerTransactionId { get; set; }

Provides a globally unique string that represents the transaction in which the change was committed. Multiple transactions can have the same commit timestamp, but each transaction has a unique server_transaction_id.

Property Value
Type Description
string

Table

public string Table { get; set; }

Name of the table affected by the change.

Property Value
Type Description
string

TransactionTag

public string TransactionTag { get; set; }

Indicates the transaction tag associated with this transaction.

Property Value
Type Description
string

ValueCaptureType

public ChangeStreamRecord.Types.DataChangeRecord.Types.ValueCaptureType ValueCaptureType { get; set; }

Describes the value capture type that was specified in the change stream configuration when this change was captured.

Property Value
Type Description
ChangeStreamRecordTypesDataChangeRecordTypesValueCaptureType