public final class LayoutDegrader extends Object
formatted > randomIndent > minified and formatted > oneTokenPerLine.
Whitespace only: no token text is ever changed. Lines that lie inside a
multi-line token (block comment, string) are left untouched by
randomIndent(java.lang.String, gudusoft.gsqlparser.EDbVendor, long, int) so comments stay byte-exact.
| Modifier and Type | Method and Description |
|---|---|
static String |
minify(String sql,
EDbVendor vendor)
Every token separated by one space on one line (a line comment forces a line break after it).
|
static String |
oneTokenPerLine(String sql,
EDbVendor vendor)
Every token on its own line, no indentation.
|
static String |
randomIndent(String sql,
EDbVendor vendor,
long seed,
int maxIndent)
Keep the line structure, replace every line's indent by a random 0..
maxIndent spaces. |
public static String minify(String sql, EDbVendor vendor)
public static String oneTokenPerLine(String sql, EDbVendor vendor)
public static String randomIndent(String sql, EDbVendor vendor, long seed, int maxIndent)
maxIndent spaces.