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 str

Changes how keywords are formatted. Allowed values are “upper”, “lower”.

identifier_case: &'a str

Changes how identifiers are formatted. Allowed values are “upper”, “lower”.

output_format: &'a strstrip_comments: bool

If True comments are removed from the statements.

use_space_around_operators: bool

If True spaces are used around all operators.

strip_whitespace: bool

if True extra spaces are removed.

reindent: bool

If True the indentations of the statements are changed.

indent_columns: boolreindent_aligned: bool

If True the indentations of the statements are changed, and statements are aligned by keywords.

indent_after_first: boolindent_tabs: bool

If True tabs instead of spaces are used for indentation.

indent_width: usize

The width of the indentation, defaults to 2.

indent_char: &'a str

set indent char, defaults to 1 whitespace.

wrap_after: usize

The column limit (in characters) for wrapping comma-separated lists. If unspecified, it puts every item in the list on its own line.

comma_first: bool

If True comma-first notation for column names is used.

right_margin: usize

Implementations

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.