#[non_exhaustive]pub struct TranspileOptions {
pub pretty: bool,
pub unsupported_level: UnsupportedLevel,
pub max_unsupported: usize,
}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.
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.
Trait Implementations§
Source§impl Clone for TranspileOptions
impl Clone for TranspileOptions
Source§fn clone(&self) -> TranspileOptions
fn clone(&self) -> TranspileOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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.