Skip to main content

decode_binlog_event

Function decode_binlog_event 

Source
pub fn decode_binlog_event(
    event: &Event,
    stream: &BinlogStream,
) -> Result<Option<BinlogMessage>, ConnectorError>
Expand description

Decodes a mysql_async binlog event into our internal BinlogMessage type.

Returns None for unsupported or irrelevant event types (e.g., FORMAT_DESCRIPTION).

§Arguments

  • event - The raw binlog event from mysql_async
  • stream - The binlog stream (provides TABLE_MAP cache via get_tme())

§Errors

Returns ConnectorError::Internal if event data cannot be parsed.