public abstract class SqlUtils extends Object
| Constructor and Description |
|---|
SqlUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
appendForLog(String value)
Prepare a string to be used as part of SQL statement in LOGCAT.
|
static String |
appendForSQL(String value)
Prepare a string to be used as part of SQL statement.
|
static String |
appendWhereForLog(boolean needWhere,
String value)
Prepare a where statement for LOG.
|
static String |
appendWhereForSQL(boolean needWhere,
String value)
Prepare a where statement for SQL.
|
static String |
formatSQL(String input,
Object... args)
Format sql
|
static String |
printIf(boolean condition,
String format,
Object... objects)
Display string
String.format(format, objects) only if condition is true |
public static String appendWhereForLog(boolean needWhere, String value)
needWhere - true if WHERE is needed before where conditions.value - where conditionspublic static String appendWhereForSQL(boolean needWhere, String value)
needWhere - true if WHERE is needed before where conditions.value - where conditionspublic static String appendForLog(String value)
value - public static String appendForSQL(String value)
value - public static String formatSQL(String input, Object... args)
input - Copyright © 2017. All rights reserved.