#[non_exhaustive]pub struct TranspileOptions {
pub pretty: bool,
pub unsupported_level: UnsupportedLevel,
pub max_unsupported: usize,
pub complexity_guard: ComplexityGuardOptions,
}Expand description
Options for Dialect::transpile_with.
Use TranspileOptions::default for defaults, then tweak the fields you need.
The struct is marked #[non_exhaustive] so new fields can be added without
breaking the API.
The struct derives Serialize/Deserialize using camelCase field names so
it can be round-tripped over JSON bridges (C FFI, WASM) without mapping.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pretty: boolWhether to pretty-print the output SQL.
unsupported_level: UnsupportedLevelHow unsupported target-dialect constructs should be handled.
The default is UnsupportedLevel::Warn, which preserves the current
compatibility behavior and continues transpilation.
max_unsupported: usizeMaximum number of unsupported diagnostics to include in raised errors.
complexity_guard: ComplexityGuardOptionsComplexity guard limits used while parsing, transforming, and generating.
Implementations§
Source§impl TranspileOptions
impl TranspileOptions
Sourcepub fn with_unsupported_level(self, level: UnsupportedLevel) -> Self
pub fn with_unsupported_level(self, level: UnsupportedLevel) -> Self
Set how unsupported target-dialect constructs should be handled.
Sourcepub fn with_max_unsupported(self, max: usize) -> Self
pub fn with_max_unsupported(self, max: usize) -> Self
Set the maximum number of unsupported diagnostics to include in raised errors.
Sourcepub fn with_complexity_guard(self, guard: ComplexityGuardOptions) -> Self
pub fn with_complexity_guard(self, guard: ComplexityGuardOptions) -> Self
Set complexity guard limits for parse/transpile/generate recursion-heavy paths.
Trait Implementations§
Source§impl Clone for TranspileOptions
impl Clone for TranspileOptions
Source§impl Debug for TranspileOptions
impl Debug for TranspileOptions
Source§impl Default for TranspileOptions
Available on crate feature transpile only.
impl Default for TranspileOptions
transpile only.