There are several options to control the format.
| Option | Description | Default |
|---|---|---|
| {@link #setSelectListItemsOnSeparateLines SelectListItemsOnSeparateLines} | Whether each item in the select clause is on its own line | false |
| {@link #setCaseClausesOnNewLines CaseClausesOnNewLines} | Whether the WHEN, THEN and ELSE clauses of a CASE expression appear at the start of a new line. | false |
| {@link #setIndentation Indentation} | Number of spaces to indent | 4 |
| {@link #setKeywordsLowerCase KeywordsLowerCase} | Whether to print keywords (SELECT, AS, etc.) in lower-case. | false |
| {@link #isAlwaysUseParentheses ParenthesizeAllExprs} | Whether to enclose all expressions in parentheses, even if the operator has high enough precedence that the parentheses are not required. For example, the parentheses are required in the expression | |
| {@link #setQuoteAllIdentifiers QuoteAllIdentifiers} | Whether to quote all identifiers, even those which would be correct according to the rules of the {@link SqlDialect} if quotation marks wereomitted. | true |
| {@link #setSelectListItemsOnSeparateLines SelectListItemsOnSeparateLines} | Whether each item in the select clause is on its own line. | false |
| {@link #setSubqueryStyle SubqueryStyle} | Style for formatting sub-queries. Values are: {@link org.eigenbase.sql.SqlWriter.SubqueryStyle#HYDE Hyde}, {@link org.eigenbase.sql.SqlWriter.SubqueryStyle#BLACK Black}. | {@link org.eigenbase.sql.SqlWriter.SubqueryStyle#HYDE Hyde} |
| {@link #setLineLength LineLength} | Set the desired maximum length for lines (to look nice in editors, printouts, etc.). | 0 |
| |
| |
| |
| |
| |
| |