SqlFmt.FormatOptions (SqlFmt v0.4.0)

View Source

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 to 2.

  • :uppercase – Configures whether SQL reserved words are capitalized. Defaults to true.

  • :lines_between_queries – Specifies how many line breaks should be present after a query. Defaults to 1.

  • :ignore_case_convert – Configures whether certain strings should not be case converted. Defaults to [].

Summary

Types

t()

The available formatting options.

Functions

Create an instance of the FormatOptions struct.

Types

t()

@type t() :: %SqlFmt.FormatOptions{
  ignore_case_convert: [String.t()],
  indent: non_neg_integer(),
  lines_between_queries: non_neg_integer(),
  uppercase: boolean()
}

The available formatting options.

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

Create an instance of the FormatOptions struct.