These options are used to control how the SQL statement is formatted. The available formatting options are:
:indent– Specifies how many spaces are used for indents Defaults to2.:uppercase– Configures whether SQL reserved words are capitalized. Defaults totrue.:lines_between_queries– Specifies how many line breaks should be present after a query. Defaults to1.:ignore_case_convert– Configures whether certain strings should not be case converted. Defaults to[].:dialect- Tells what dialect of SQL to use for formatting. Defaults to:postgres.:inline- Directs the SQL formatter whether to keep the query within a single line. Defaults tofalse.:joins_as_top_level- Consider any JOIN statement as a top level keyword instead of a reserved keyword. Defaults tofalse.:max_inline_block- Maximum length of an inline block. Defaults to50.:max_inline_arguments- Maximum length of inline arguments. Ifnilthen every argument will be placed on a separate line. Defaults tonil.:max_inline_top_level- Inline the argument at the top level if they would fit a line of this length. Defaults tonil.
Summary
Functions
Create an instance of the FormatOptions struct.
Types
@type t() :: %SqlFmt.FormatOptions{ dialect: :generic | :postgres | :sql_server, ignore_case_convert: [String.t()], indent: non_neg_integer(), inline: boolean(), joins_as_top_level: boolean(), lines_between_queries: non_neg_integer(), max_inline_arguments: non_neg_integer() | nil, max_inline_block: non_neg_integer(), max_inline_top_level: non_neg_integer() | nil, uppercase: boolean() }
The available formatting options.