Skip to main content

Module decoding

Module decoding 

Source

FunctionsΒ§

check_char_length πŸ”’
decode_error πŸ”’
Build a ValueDecodeError, logging the schema, table, column, source gtid_set (if any), and a shape description of row at the same time. The shape string is only built here β€” pack_mysql_row’s happy path does no per-row allocation beyond what decoding requires.
describe_row_shape πŸ”’
Describes the structural shape of a row without revealing any data values. Iterates every wire column. For each, emits the wire name, the binlog wire type, the character-set id (or binary), a classification relative to table_desc (expected=<scalar> for active columns, ignored for columns excluded from the source, extra for upstream columns with no descriptor entry), and a value disposition (null or bytes(len=N) / primitive kind). Intended for diagnostic logging on decode errors: MySQL serializes CHAR, VARCHAR, TEXT, JSON, BLOB, etc. all as Value::Bytes, so the wire type tag and the expected scalar type are what distinguish them.
pack_mysql_row
pack_val_as_datum πŸ”’