Skip to main content

TableChange

Type Alias TableChange 

Source
pub type TableChange = TableChange;
👎Deprecated since 4.0.0: Use substreams_database_change::pb::sf::substreams::sink::database::v1 instead, this module will be removed in future versions.

Aliased Type§

pub struct TableChange {
    pub table: String,
    pub ordinal: u64,
    pub operation: i32,
    pub fields: Vec<Field>,
    pub primary_key: Option<PrimaryKey>,
}

Fields§

§table: String

table is the name of the database table to modify. This should match the actual table name in your database schema.

§ordinal: u64

ordinal provides ordering information for this change within the block. Changes with lower ordinal values are applied before changes with higher values. This ensures deterministic ordering when multiple changes affect the same or related data.

§operation: i32

operation specifies what type of change to apply to the table row.

§fields: Vec<Field>

fields contains the column values to set or update. For CREATE and UPSERT operations, these are the values for the new/updated row. For UPDATE operations, these are the columns to modify. For DELETE operations, fields may be empty or contain old values for logging/auditing.

§primary_key: Option<PrimaryKey>

primary_key identifies the row to operate on. Use either a single primary key string or a composite primary key for tables with multi-column primary keys.