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
- Insert
Parser - Parser for MySQL INSERT statements
- Insert
RowContext - Precomputed per-statement column context, so
Parser::visit_eventsconsumers can parse individual INSERT tuples (delivered ascrate::parser::ParserEvent::InsertRow) without re-deriving the column order for every row. Built once per INSERT header. - Insert
Values - Result of parsing INSERT values for bulk loading
- Parsed
Row - A parsed row from an INSERT statement
Enums§
- Parsed
Value - 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 explicitRowExtractionlevel so consumers that don’t needall_values(or PK/FK at all) skip that work. - parse_
insert_ tuple - Parse a single INSERT
(...)tuple with a precomputedInsertRowContext. - 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.freturns aRowFlowto stop early. Only the fields required byextractionare allocated per row.
Type Aliases§
- PkHash
Set - 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