pub struct NormalizerOptions {
pub unify_in_list: bool,
pub unify_values: bool,
pub alphabetize_insert_columns: bool,
}Expand description
Toggles for normalize_with_options. Defaults to all false
(placeholder substitution only).
Fields§
§unify_in_list: boolUnify IN lists to a single form when all elements are literal values.
For example, IN (1, 2, 3) becomes IN (...).
unify_values: boolUnify VALUES lists to a single form when all elements are literal values.
For example, VALUES (1, 2, 3), (4, 5, 6) becomes VALUES (...).
alphabetize_insert_columns: boolAlphabetize column lists for INSERT statements with a VALUES expression
that gets unified.
For example, INSERT INTO t(c, b, a) becomes INSERT INTO t(a, b, c).
Implementations§
Source§impl NormalizerOptions
impl NormalizerOptions
pub fn new() -> Self
pub fn with_unify_in_list(self, unify_in_list: bool) -> Self
pub fn with_unify_values(self, unify_values: bool) -> Self
pub fn with_alphabetize_insert_columns( self, alphabetize_insert_columns: bool, ) -> Self
Trait Implementations§
Source§impl Clone for NormalizerOptions
impl Clone for NormalizerOptions
Source§fn clone(&self) -> NormalizerOptions
fn clone(&self) -> NormalizerOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for NormalizerOptions
impl Default for NormalizerOptions
Source§fn default() -> NormalizerOptions
fn default() -> NormalizerOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NormalizerOptions
impl RefUnwindSafe for NormalizerOptions
impl Send for NormalizerOptions
impl Sync for NormalizerOptions
impl Unpin for NormalizerOptions
impl UnsafeUnpin for NormalizerOptions
impl UnwindSafe for NormalizerOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more