public class SqlFormatter extends Object
| Constructor and Description |
|---|
SqlFormatter() |
| Modifier and Type | Method and Description |
|---|---|
static String |
format(String query) |
static String |
format(String query,
FormatConfig cfg)
FormatConfig whitespaces in a query to make it easier to read.
|
static String |
format(String query,
List<?> params) |
static String |
format(String query,
Map<String,?> params) |
static String |
format(String query,
String indent) |
static String |
format(String query,
String indent,
List<?> params) |
static String |
format(String query,
String indent,
Map<String,?> params) |
static AbstractFormatter |
of(String name) |
static AbstractFormatter |
standard() |
public static String format(String query, FormatConfig cfg)
query - sqlcfg - cfg.indent Characters used for indentation, default is " " (2 spaces)
cfg.params Collection of params for placeholder replacementpublic static AbstractFormatter standard()
public static AbstractFormatter of(String name)
Copyright © 2020. All rights reserved.