Enum SqlWriterConfig.LineFolding

java.lang.Object
java.lang.Enum<SqlWriterConfig.LineFolding>
org.apache.calcite.sql.SqlWriterConfig.LineFolding
All Implemented Interfaces:
Serializable, Comparable<SqlWriterConfig.LineFolding>, Constable
Enclosing interface:
SqlWriterConfig

public static enum SqlWriterConfig.LineFolding extends Enum<SqlWriterConfig.LineFolding>
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.

SQL formatted with each Folding value
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