public static enum SqlWriterConfig.LineFolding extends Enum<SqlWriterConfig.LineFolding>
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 |
| Enum Constant and Description |
|---|
CHOP
Chop down if long.
|
FOLD
Wrap if long.
|
STEP
As
WIDE but start a new line if SqlWriterConfig.clauseEndsLine(). |
TALL
Wrap always.
|
WIDE
Do not wrap.
|
| Modifier and Type | Method and Description |
|---|---|
static SqlWriterConfig.LineFolding |
valueOf(String name)
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.
|
public static final SqlWriterConfig.LineFolding WIDE
public static final SqlWriterConfig.LineFolding STEP
WIDE but start a new line if SqlWriterConfig.clauseEndsLine().public static final SqlWriterConfig.LineFolding FOLD
SqlWriterConfig.foldLength(), move items to the next line.public static final SqlWriterConfig.LineFolding CHOP
SqlWriterConfig.foldLength(), put all items on separate lines.public static final SqlWriterConfig.LineFolding TALL
public static SqlWriterConfig.LineFolding[] values()
for (SqlWriterConfig.LineFolding c : SqlWriterConfig.LineFolding.values()) System.out.println(c);
public static SqlWriterConfig.LineFolding valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.