Skip to main content

Module generator

Module generator 

Source
Expand description

SQL Generator – converts an AST back into SQL strings.

The central type is Generator, which walks an Expression tree and emits a SQL string. Generation is controlled by a GeneratorConfig that specifies the target dialect, formatting preferences, identifier quoting style, function name casing, and many other dialect-specific flags.

For one-off generation the static helpers Generator::sql and Generator::pretty_sql are the simplest entry points. For repeated generation, construct a Generator once with Generator::with_config and call Generator::generate for each expression.

Structs§

Generator
SQL code generator that converts an AST (Expression) back into a SQL string.
GeneratorConfig
Configuration for the SQL Generator.
IdentifierQuoteStyle
Identifier quote style (start/end characters)

Enums§

LimitFetchStyle
Strategy for generating row-limiting clauses across SQL dialects.
NormalizeFunctions
Controls how SQL function names are cased in generated output.