public final class JdbcUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
executeSql(String sql,
Connection connection,
boolean isDebug)
Executes the specified SQL with the specified connection.
|
static boolean |
executeSql(String sql,
List<Object> paramList,
Connection connection,
boolean isDebug)
Executes the specified SQL with the specified params and connection...
|
static void |
fromOracleClobEmpty(JSONObject jsonObject)
Process Oracle CLOB empty string.
|
static JSONArray |
queryJsonArray(String sql,
List<Object> paramList,
Connection connection,
String tableName,
boolean isDebug)
queryJsonArray.
|
static JSONObject |
queryJsonObject(String sql,
List<Object> paramList,
Connection connection,
String tableName,
boolean isDebug)
queryJsonObject.
|
public static boolean executeSql(String sql, Connection connection, boolean isDebug) throws SQLException
sql - the specified SQLconnection - connection the specified connectionisDebug - the specified debug flagtrue if success, returns false otherwiseSQLException - SQLExceptionpublic static boolean executeSql(String sql, List<Object> paramList, Connection connection, boolean isDebug) throws SQLException
sql - the specified SQLparamList - the specified paramsconnection - the specified connectionisDebug - the specified debug flagtrue if success, returns false otherwiseSQLException - SQLExceptionpublic static JSONObject queryJsonObject(String sql, List<Object> paramList, Connection connection, String tableName, boolean isDebug) throws SQLException, JSONException, RepositoryException
sql - sqlparamList - paramListconnection - connectiontableName - tableNameisDebug - the specified debug flagSQLException - SQLExceptionJSONException - JSONExceptionRepositoryException - repositoryExceptionpublic static JSONArray queryJsonArray(String sql, List<Object> paramList, Connection connection, String tableName, boolean isDebug) throws SQLException, JSONException, RepositoryException
sql - sqlparamList - paramListconnection - connectiontableName - tableNameisDebug - the specified debug flagSQLException - SQLExceptionJSONException - JSONExceptionRepositoryException - repositoryExceptionpublic static void fromOracleClobEmpty(JSONObject jsonObject)
jsonObject - the specified JSON objectCopyright © 2009–2019 B3log. All rights reserved.