Expand description
SQL literal parameterization: replace all literal values with ?.
The parameterize function is a lexical (not AST-level) transformation
that replaces numeric literals, string literals, NULL, TRUE, and FALSE
with positional ? placeholders. Quoted identifiers ("name") are
deliberately left untouched.
The resulting ParameterizedSql::template can be used as a stable cache key
that is independent of the concrete literal values.
Structs§
- Parameterized
Sql - The result of
parameterize(sql).
Functions§
- parameterize
- Replace all SQL literals in
sqlwith?placeholders.