Expand description
Basic SQL formatting — round-trips through sqlparser’s AST
and emits its Display. See format() as the entry point.
Output is a pass-through to sqlparser::ast::Statement’s
Display impl (keywords uppercase, single-space separators,
comments dropped). Default is single-line; opt into sqlparser’s
multi-line pretty-print by setting FormatterOptions::pretty
and using format_with_options.
For value-normalization (collapsing 1 and 42 into the same
literal, etc.) see crate::normalizer.
Structs§
- Formatter
- Struct-style entry point. Used by both
format()andformat_with_options(). - Formatter
Options - Options controlling
format_with_options()/Formatter::format.
Functions§
- format
- Parse
sqlunderdialectand re-emit one formatted string per statement. - format_
with_ options - Parse
sqlunderdialectand re-emit one formatted string per statement, with formatting controlled byoptions.