Package org.apache.calcite.sql
Enum SqlWriterConfig.LineFolding
- All Implemented Interfaces:
Serializable
,Comparable<SqlWriterConfig.LineFolding>
,Constable
- Enclosing interface:
SqlWriterConfig
Policy for how to do deal with long lines.
The following examples all have
ClauseEndsLine=true
,
Indentation=4
, and
FoldLength=25
(so that the long SELECT
clause folds but the shorter GROUP BY
clause does not).
Note that ClauseEndsLine
is observed in
STEP and TALL modes, and in CHOP mode when a line is long.
Folding | Example |
---|---|
WIDE | SELECT abc, def, ghi, jkl, mno, pqr FROM t GROUP BY abc, def |
STEP | SELECT abc, def, ghi, jkl, mno, pqr FROM t GROUP BY abc, def |
FOLD | SELECT abc, def, ghi, jkl, mno, pqr FROM t GROUP BY abc, def |
CHOP | SELECT abc, def, ghi, jkl, mno, pqr FROM t GROUP BY abc, def |
TALL | SELECT abc, def, ghi, jkl, mno, pqr FROM t GROUP BY abc, def |
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SqlWriterConfig.LineFolding
Returns the enum constant of this type with the specified name.static SqlWriterConfig.LineFolding[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
WIDE
Do not wrap. Items are on the same line, regardless of length. -
STEP
AsWIDE
but start a new line ifSqlWriterConfig.clauseEndsLine()
. -
FOLD
Wrap if long. Items are on the same line, but if the line's length exceedsSqlWriterConfig.foldLength()
, move items to the next line. -
CHOP
Chop down if long. Items are on the same line, but if the line grows longer thanSqlWriterConfig.foldLength()
, put all items on separate lines. -
TALL
Wrap always. Items are on separate lines.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-