Statement types this rule applies to
OptionalBypassIf BypassSqlglot is true, this field documents WHY sqlglot is bypassed.
Intended audience: future maintainers deciding whether the bypass is still
needed (e.g., after a sqlglot upgrade). Should describe:
Required when BypassSqlglot is true. Helps with the architecture goal of
"SQLGlot handles >90% of statements" by making the bypass surface auditable.
OptionalBypassIf true, this rule handles conversion entirely — skip sqlglot. The PostProcess method receives the original SQL as both parameters.
Human-readable name for logging/debugging
Priority — lower numbers run first (default: 100)
Source SQL dialect this rule converts from (e.g., 'tsql')
Target SQL dialect this rule converts to (e.g., 'postgres')
OptionalPostTransform SQL AFTER sqlglot transpilation.
The sqlglot-transpiled SQL (or original if BypassSqlglot)
The original T-SQL statement
Shared conversion context
The final converted SQL
OptionalPreTransform SQL BEFORE sqlglot transpilation. Return the modified SQL string.
Interface for a single conversion rule.
Rules are applied to statements that match their AppliesTo list. They can pre-process (before sqlglot), post-process (after sqlglot), or fully bypass sqlglot by setting BypassSqlglot = true.