Package org.apache.calcite.sql.pretty
Class SqlFormatOptions
java.lang.Object
org.apache.calcite.sql.pretty.SqlFormatOptions
Data structure to hold options for
SqlPrettyWriter.setFormatOptions(SqlFormatOptions)
.-
Constructor Summary
ConstructorDescriptionConstructs a set of default SQL format options.SqlFormatOptions
(boolean alwaysUseParentheses, boolean caseClausesOnNewLines, boolean clauseStartsLine, boolean keywordsLowercase, boolean quoteAllIdentifiers, boolean selectListItemsOnSeparateLines, boolean whereListItemsOnSeparateLines, boolean windowDeclarationStartsLine, boolean windowListItemsOnSeparateLines, int indentation, int lineLength) Constructs a complete set of SQL format options. -
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setAlwaysUseParentheses
(boolean alwaysUseParentheses) void
setCaseClausesOnNewLines
(boolean caseClausesOnNewLines) void
setClauseStartsLine
(boolean clauseStartsLine) void
setIndentation
(int indentation) void
setKeywordsLowercase
(boolean keywordsLowercase) void
setLineLength
(int lineLength) void
setQuoteAllIdentifiers
(boolean quoteAllIdentifiers) void
setSelectListItemsOnSeparateLines
(boolean selectListItemsOnSeparateLines) void
setWhereListItemsOnSeparateLines
(boolean whereListItemsOnSeparateLines) void
setWindowDeclarationStartsLine
(boolean windowDeclarationStartsLine) void
setWindowListItemsOnSeparateLines
(boolean windowListItemsOnSeparateLines)
-
Constructor Details
-
SqlFormatOptions
public SqlFormatOptions()Constructs a set of default SQL format options. -
SqlFormatOptions
public SqlFormatOptions(boolean alwaysUseParentheses, boolean caseClausesOnNewLines, boolean clauseStartsLine, boolean keywordsLowercase, boolean quoteAllIdentifiers, boolean selectListItemsOnSeparateLines, boolean whereListItemsOnSeparateLines, boolean windowDeclarationStartsLine, boolean windowListItemsOnSeparateLines, int indentation, int lineLength) Constructs a complete set of SQL format options.- Parameters:
alwaysUseParentheses
- Always use parenthesescaseClausesOnNewLines
- Case clauses on new linesclauseStartsLine
- Clause starts linekeywordsLowercase
- Keywords in lower casequoteAllIdentifiers
- Quote all identifiersselectListItemsOnSeparateLines
- Select items on separate lineswhereListItemsOnSeparateLines
- Where items on separate lineswindowDeclarationStartsLine
- Window declaration starts linewindowListItemsOnSeparateLines
- Window list items on separate linesindentation
- IndentationlineLength
- Line length
-
-
Method Details
-
isAlwaysUseParentheses
public boolean isAlwaysUseParentheses() -
setAlwaysUseParentheses
public void setAlwaysUseParentheses(boolean alwaysUseParentheses) -
isCaseClausesOnNewLines
public boolean isCaseClausesOnNewLines() -
setCaseClausesOnNewLines
public void setCaseClausesOnNewLines(boolean caseClausesOnNewLines) -
isClauseStartsLine
public boolean isClauseStartsLine() -
setClauseStartsLine
public void setClauseStartsLine(boolean clauseStartsLine) -
isKeywordsLowercase
public boolean isKeywordsLowercase() -
setKeywordsLowercase
public void setKeywordsLowercase(boolean keywordsLowercase) -
isQuoteAllIdentifiers
public boolean isQuoteAllIdentifiers() -
setQuoteAllIdentifiers
public void setQuoteAllIdentifiers(boolean quoteAllIdentifiers) -
isSelectListItemsOnSeparateLines
public boolean isSelectListItemsOnSeparateLines() -
setSelectListItemsOnSeparateLines
public void setSelectListItemsOnSeparateLines(boolean selectListItemsOnSeparateLines) -
isWhereListItemsOnSeparateLines
public boolean isWhereListItemsOnSeparateLines() -
setWhereListItemsOnSeparateLines
public void setWhereListItemsOnSeparateLines(boolean whereListItemsOnSeparateLines) -
isWindowDeclarationStartsLine
public boolean isWindowDeclarationStartsLine() -
setWindowDeclarationStartsLine
public void setWindowDeclarationStartsLine(boolean windowDeclarationStartsLine) -
isWindowListItemsOnSeparateLines
public boolean isWindowListItemsOnSeparateLines() -
setWindowListItemsOnSeparateLines
public void setWindowListItemsOnSeparateLines(boolean windowListItemsOnSeparateLines) -
getLineLength
public int getLineLength() -
setLineLength
public void setLineLength(int lineLength) -
getIndentation
public int getIndentation() -
setIndentation
public void setIndentation(int indentation)
-