SQL Formatter Options
Options
SQL Analytics
SQLinForm provides various formatting options for Analytic Expressions (OVER) to improve SQL readability and consistency. These options control line breaks and indentation for expressions using the OVER
clause, which is commonly used in window functions.
1. Line Breaks
These settings define how line breaks are inserted around parentheses and key SQL clauses inside the OVER
statement.
- Before
(
: Inserts a line break before an opening parenthesis. - After
(
: Inserts a line break immediately after an opening parenthesis. - Before
)
: If enabled, inserts a line break before a closing parenthesis. - After
)
: If enabled, inserts a line break after a closing parenthesis. - Before
PARTITION BY, ORDER BY, ...
: Forces a line break before keywords such asPARTITION BY
andORDER BY
insideOVER()
. - Stack Attributes: Aligns elements inside
OVER()
vertically, making it easier to read.
2. Indentation
These options determine how elements inside the OVER()
clause are indented.
- Indent Statement inside Brackets: If enabled, statements inside parentheses are indented for better structure.
- Indent Bracket: If enabled, the parentheses enclosing the
OVER()
clause are also indented.
Summary
These options allow users to fine-tune the formatting of analytic expressions, improving readability and maintaining a consistent SQL style. Developers can choose whether to insert line breaks before or after specific elements and adjust indentation for better clarity.