Skip to main content

Module mysql_insert

Module mysql_insert 

Source
Expand description

MySQL INSERT statement row parser.

Parses INSERT INTO … VALUES statements to extract individual rows and optionally extract PK/FK column values for dependency tracking.

Structs§

FkRef
Reference to a specific foreign key in a table
InsertParser
Parser for MySQL INSERT statements
InsertRowContext
Precomputed per-statement column context, so Parser::visit_events consumers can parse individual INSERT tuples (delivered as crate::parser::ParserEvent::InsertRow) without re-deriving the column order for every row. Built once per INSERT header.
InsertValues
Result of parsing INSERT values for bulk loading
ParsedRow
A parsed row from an INSERT statement

Enums§

ParsedValue
Parsed value from an INSERT statement
PkValue
Primary key value representation supporting common types
RowExtraction
How much derived data to compute per parsed row.

Functions§

hash_pk_tuple
Hash a PK tuple into a compact 64-bit hash for memory-efficient storage. Uses AHash for fast, high-quality hashing.
parse_insert_for_bulk
Parse INSERT statement for bulk loading (extracts table, columns, and values)
parse_insert_rows
Parse all rows from an INSERT statement using the given dialect’s escaping.
parse_insert_rows_with
Like parse_insert_rows, but with an explicit RowExtraction level so consumers that don’t need all_values (or PK/FK at all) skip that work.
parse_insert_tuple
Parse a single INSERT (...) tuple with a precomputed InsertRowContext.
parse_mysql_insert_rows
Parse all rows from a MySQL INSERT statement
parse_mysql_insert_rows_raw
Parse rows without schema (just raw row extraction)
visit_insert_rows_with
Stream the rows of an INSERT statement to a visitor, one at a time, without building a statement-sized Vec. f returns a RowFlow to stop early. Only the fields required by extraction are allocated per row.

Type Aliases§

PkHashSet
Compact hash-based set of primary keys for memory efficiency. Uses 64-bit hashes instead of full values - suitable for large datasets where collision risk is acceptable (sampling, validation).
PkSet
Set of primary key values for a table (stores full tuples)
PkTuple
Tuple of PK values for composite primary keys