Expand description
Homemade SQL tokenizer/normalizer.
Replaces numeric literals, string literals, and UUIDs with ?
placeholders. PostgreSQL positional parameters ($1, $2) are
recognized as driver placeholders and emitted as $? with empty
params (not extracted as literals). This keeps params empty for
parameterized queries so the sanitizer-aware detection path can
fire. Collapses IN (?, ?, ?) into IN (?). Quoted identifiers are
preserved verbatim: ANSI "id" and MySQL `id`.
Structs§
- SqlNormalized
- Result of SQL normalization.
Functions§
- normalize_
sql - Normalize a SQL query by replacing literal values with
?placeholders.