@UtilityMarker public final class DatabaseUtility extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkConnection(Connection connection) |
static Statement |
createStatement(Connection connection) |
static void |
executeScriptFromResource(Connection connection,
String scriptResource) |
static ResultSet |
executeSql(Statement statement,
String sql) |
static ResultSet |
executeSql(Statement statement,
String sql,
boolean throwSQLException) |
static long |
executeSqlForLong(Connection connection,
String sql) |
static Object |
executeSqlForScalar(Connection connection,
String sql) |
static void |
logSQLWarnings(ResultSet resultSet) |
static void |
logSQLWarnings(Statement statement) |
static List<String> |
readResultsVector(ResultSet results)
Reads a single column result set as a list.
|
public static void checkConnection(Connection connection) throws SchemaCrawlerException
SchemaCrawlerExceptionpublic static Statement createStatement(Connection connection) throws SchemaCrawlerException, SQLException
SchemaCrawlerExceptionSQLExceptionpublic static void executeScriptFromResource(Connection connection, String scriptResource) throws SchemaCrawlerException
SchemaCrawlerExceptionpublic static ResultSet executeSql(Statement statement, String sql) throws SQLException
SQLExceptionpublic static ResultSet executeSql(Statement statement, String sql, boolean throwSQLException) throws SQLException
SQLExceptionpublic static long executeSqlForLong(Connection connection, String sql) throws SchemaCrawlerException
SchemaCrawlerExceptionpublic static Object executeSqlForScalar(Connection connection, String sql) throws SchemaCrawlerException
SchemaCrawlerExceptionpublic static void logSQLWarnings(ResultSet resultSet)
public static void logSQLWarnings(Statement statement)
public static List<String> readResultsVector(ResultSet results) throws SQLException
results - Result setSQLException - On an exceptionCopyright © 2000-2017 Sualeh Fatehi. All rights reserved.