Struct sqlparse::FormatOption
source · [−]pub struct FormatOption<'a> {Show 16 fields
pub keyword_case: &'a str,
pub identifier_case: &'a str,
pub output_format: &'a str,
pub strip_comments: bool,
pub use_space_around_operators: bool,
pub strip_whitespace: bool,
pub reindent: bool,
pub indent_columns: bool,
pub reindent_aligned: bool,
pub indent_after_first: bool,
pub indent_tabs: bool,
pub indent_width: usize,
pub indent_char: &'a str,
pub wrap_after: usize,
pub comma_first: bool,
pub right_margin: usize,
/* private fields */
}Expand description
sql format options
Fields
keyword_case: &'a strChanges how keywords are formatted. Allowed values are “upper”, “lower”.
identifier_case: &'a strChanges how identifiers are formatted. Allowed values are “upper”, “lower”.
output_format: &'a strstrip_comments: boolIf True comments are removed from the statements.
use_space_around_operators: boolIf True spaces are used around all operators.
strip_whitespace: boolif True extra spaces are removed.
reindent: boolIf True the indentations of the statements are changed.
indent_columns: boolreindent_aligned: boolIf True the indentations of the statements are changed, and statements are aligned by keywords.
indent_after_first: boolindent_tabs: boolIf True tabs instead of spaces are used for indentation.
indent_width: usizeThe width of the indentation, defaults to 2.
indent_char: &'a strset indent char, defaults to 1 whitespace.
wrap_after: usizeThe column limit (in characters) for wrapping comma-separated lists. If unspecified, it puts every item in the list on its own line.
comma_first: boolIf True comma-first notation for column names is used.
right_margin: usizeImplementations
sourceimpl<'a> FormatOption<'a>
impl<'a> FormatOption<'a>
pub fn default_reindent() -> Self
pub fn default_reindent_aligned() -> Self
Trait Implementations
sourceimpl<'a> Default for FormatOption<'a>
impl<'a> Default for FormatOption<'a>
sourcefn default() -> FormatOption<'a>
fn default() -> FormatOption<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for FormatOption<'a>
impl<'a> Send for FormatOption<'a>
impl<'a> Sync for FormatOption<'a>
impl<'a> Unpin for FormatOption<'a>
impl<'a> UnwindSafe for FormatOption<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more