public class DatabaseUtilities extends Object
| Constructor and Description |
|---|
DatabaseUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
adjustValue(Object value) |
static <T> T |
aggregate(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IConverter<Iterable<IResult>,T,SQLException> function) |
static <T> T |
aggregate(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<Iterable<IResult>,T,SQLException> resultProcedure) |
static <T> T |
aggregate(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IConverter<Iterable<IResult>,T,SQLException> function) |
static boolean |
booleanResult(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static boolean |
booleanResult(Connection connection,
String statementString,
Object... values) |
static boolean |
booleanResult(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static boolean |
call(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> procedure) |
static boolean |
call(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IProcedure<ResultSet,SQLException> resultProcedure) |
static boolean |
call(Connection connection,
String statementString,
Object... values) |
static void |
close(Connection connection) |
static SQLException |
close(Connection connection,
SQLException exception) |
static void |
close(IResults results) |
static SQLException |
close(IResults results,
SQLException exception) |
static void |
close(ResultSet resultSet) |
static SQLException |
close(ResultSet resultSet,
SQLException exception) |
static void |
close(Statement statement) |
static SQLException |
close(Statement statement,
SQLException exception) |
static boolean |
containts(Connection connection,
String statementString,
String columnName,
Object value) |
static int |
count(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static int |
count(Connection connection,
String statementString,
Object... values) |
static int |
count(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
Object... values) |
static boolean |
create(Connection connection,
String statementString) |
static Connection |
createConnection(String url,
String user,
String password) |
static Connection |
createConnection(String url,
String user,
String password,
boolean isReadOnly) |
static String |
createIdentifierSelectStatement(String tableName,
String identifierColumnName,
Iterable<String> valueColumnNames) |
static String |
createIdentifierSelectStatement(String tableName,
String identifierColumnName,
String orderByColumnName,
Iterable<String> valueColumnNames) |
static void |
createIfNotExists(Connection connection,
String schemaName,
String tableName,
String createStatementString) |
static void |
dropIndex(Connection connection,
String schemaName,
String indexName) |
static void |
dropTable(Connection connection,
String schemaName,
String tableName) |
static boolean |
execute(Connection connection,
String statementString) |
static boolean |
execute(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> procedure) |
static boolean |
execute(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IProcedure<ResultSet,SQLException> resultProcedure) |
static boolean |
execute(Connection connection,
String statementString,
Object... values) |
static void |
execute(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
net.anwiba.commons.lang.functional.IProcedure<Connection,SQLException> procedure) |
static boolean |
execute(Statement statement,
String statementString) |
static boolean |
exists(Connection connection,
String schemaName,
String tableName) |
static boolean |
exists(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription) |
static String |
getAsString(Statement statement,
String statementString) |
static int |
getMajorVersion(Connection connection) |
static int |
getMinorVersion(Connection connection) |
static String |
getOwner(Connection connection,
String owner) |
static String |
getProduct(Connection connection) |
static String |
getSchemaName(Connection connection,
String schemaName) |
static String |
getStatementString(Connection connection,
double beforVersion,
String statement,
String defaultStatement) |
static String[] |
getTableTypes(DatabaseMetaData metaData,
net.anwiba.commons.lang.functional.IApplicable<String> applicableType) |
static String |
getVersion(Connection connection) |
static double |
getVersionAsDouble(Connection connection) |
static Driver |
loadDriver(String driverName) |
static Long |
longResult(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static Long |
longResult(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,Long,SQLException> resultFunction) |
static Long |
longResult(Connection connection,
String statementString,
Object... values) |
static Long |
longResult(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static Long |
next(Connection connection,
String nextValueStatement) |
static <T> net.anwiba.commons.lang.functional.IClosableIterator<T,SQLException> |
query(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory,
Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> converter) |
static Map<String,Constraint> |
readConstraints(Connection connection,
String selectStatement,
String schemaName,
String tableName) |
static <T> T |
result(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> function) |
static <T> T |
result(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> resultFunction) |
static <T> T |
result(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> resultFunction) |
static <T> T |
result(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> resultFunction) |
static <T> List<T> |
results(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> function) |
static <T> List<T> |
results(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultFunction) |
static <T> List<T> |
results(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IInterruptableProcedure<PreparedStatement,SQLException> prepareClosure,
net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultFunction) |
static <T> List<T> |
results(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> resultProcedure) |
static <T> List<T> |
results(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> function) |
static <T> List<T> |
results(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultFunction) |
static <T> List<T> |
results(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> function) |
static <T> List<T> |
results(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory,
Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> resultFunction) |
static <T> List<T> |
results(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory,
Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IInterruptableProcedure<PreparedStatement,SQLException> prepareClosure,
net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultProcedure) |
static <T> List<T> |
results(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory,
Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> resultConverter) |
static ResultSet |
resultSet(Connection connection,
String string) |
static <T> ResultSet |
resultSet(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> |
setterProcedur(Object... objects) |
static String |
stringResult(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static String |
stringResult(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure,
net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,String,SQLException> resultFunction) |
static String |
stringResult(Connection connection,
String statementString,
Object... values) |
static String |
stringResult(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static String |
toString(ResultSet resultSet) |
static List<Object> |
update(Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static List<Object> |
update(Connection connection,
String statementString,
Object... values) |
static List<Object> |
update(Connection connection,
String statementString,
String[] returnColumns,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static List<Object> |
update(Connection connection,
String statementString,
String[] returnColumns,
Object... values) |
static List<Object> |
update(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String updatetStatement,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static List<Object> |
update(IDatabaseConnector connector,
IJdbcConnectionDescription connectionDescription,
String updatetStatement,
String[] returnColumns,
net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) |
static <I> net.anwiba.commons.lang.functional.ICloseableConsumer<I,Boolean,SQLException> |
update(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory,
Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IAggregator<PreparedStatement,I,Boolean,SQLException> aggregator) |
static <I> net.anwiba.commons.lang.functional.ICloseableConsumer<I,Boolean,SQLException> |
update(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory,
Connection connection,
String statementString,
net.anwiba.commons.lang.functional.IConverter<I,List<IDatabaseValue>,SQLException> converter) |
IDatabaseValue |
value(Object object,
int type) |
IDatabaseValue |
value(Object object,
int type,
String typeName) |
public static Connection createConnection(String url, String user, String password, boolean isReadOnly) throws SQLException
SQLExceptionpublic static Connection createConnection(String url, String user, String password) throws SQLException
SQLExceptionpublic static void close(Connection connection)
public static SQLException close(Connection connection, SQLException exception)
public static SQLException close(Statement statement, SQLException exception)
public static SQLException close(ResultSet resultSet, SQLException exception)
public static SQLException close(IResults results, SQLException exception)
public static void close(IResults results)
public static void close(Statement statement)
public static void close(ResultSet resultSet)
public static String getStatementString(Connection connection, double beforVersion, String statement, String defaultStatement) throws SQLException
SQLExceptionpublic static double getVersionAsDouble(Connection connection) throws SQLException
SQLExceptionpublic static String getProduct(Connection connection) throws SQLException
SQLExceptionpublic static String getVersion(Connection connection) throws SQLException
SQLExceptionpublic static int getMajorVersion(Connection connection) throws SQLException
SQLExceptionpublic static int getMinorVersion(Connection connection) throws SQLException
SQLExceptionpublic static Map<String,Constraint> readConstraints(Connection connection, String selectStatement, String schemaName, String tableName) throws SQLException
SQLExceptionpublic static void dropTable(Connection connection, String schemaName, String tableName) throws SQLException
SQLExceptionpublic static void dropIndex(Connection connection, String schemaName, String indexName) throws SQLException
SQLExceptionpublic static String getOwner(Connection connection, String owner) throws SQLException
SQLExceptionpublic static <T> List<T> results(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> function) throws SQLException
SQLExceptionpublic static <T> List<T> results(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> function) throws SQLException
SQLExceptionpublic static <T> List<T> results(Connection connection, String statementString, net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> function) throws SQLException
SQLExceptionpublic static <T> List<T> results(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> resultProcedure) throws SQLException
SQLExceptionpublic static <T> List<T> results(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory, Connection connection, String statementString, net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> resultFunction) throws SQLException
SQLExceptionpublic static <T> List<T> results(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory, Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> resultConverter) throws SQLException
SQLExceptionpublic static ResultSet resultSet(Connection connection, String string) throws SQLException
SQLExceptionpublic static <T> ResultSet resultSet(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static String stringResult(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static String stringResult(Connection connection, String statementString, Object... values) throws SQLException
SQLExceptionpublic static String stringResult(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static String stringResult(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,String,SQLException> resultFunction) throws SQLException
SQLExceptionpublic static Long longResult(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static Long longResult(Connection connection, String statementString, Object... values) throws SQLException
SQLExceptionpublic static Long longResult(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static Long longResult(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,Long,SQLException> resultFunction) throws SQLException
SQLExceptionpublic static boolean booleanResult(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static boolean booleanResult(Connection connection, String statementString, Object... values) throws SQLException
SQLExceptionpublic static boolean booleanResult(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static <T> T result(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> resultFunction) throws SQLException
SQLExceptionpublic static <T> T result(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> resultFunction) throws SQLException
SQLExceptionpublic static <T> T result(Connection connection, String statementString, net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> function) throws SQLException
SQLExceptionpublic static <T> T result(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<net.anwiba.commons.lang.optional.IOptional<IResult,SQLException>,T,SQLException> resultFunction) throws SQLException
SQLExceptionpublic static <T> List<T> results(Connection connection, String statementString, net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultFunction) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic static <T> List<T> results(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultFunction) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic static <T> List<T> results(Connection connection, String statementString, net.anwiba.commons.lang.functional.IInterruptableProcedure<PreparedStatement,SQLException> prepareClosure, net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultFunction) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic static <T> List<T> results(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory, Connection connection, String statementString, net.anwiba.commons.lang.functional.IInterruptableProcedure<PreparedStatement,SQLException> prepareClosure, net.anwiba.commons.lang.functional.IInterruptableFunction<IResult,T,SQLException> resultProcedure) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic static <T> T aggregate(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, net.anwiba.commons.lang.functional.IConverter<Iterable<IResult>,T,SQLException> function) throws SQLException
SQLExceptionpublic static <T> T aggregate(Connection connection, String statementString, net.anwiba.commons.lang.functional.IConverter<Iterable<IResult>,T,SQLException> function) throws SQLException
SQLExceptionpublic static <T> T aggregate(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<Iterable<IResult>,T,SQLException> resultProcedure) throws SQLException
SQLExceptionpublic static boolean execute(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IProcedure<ResultSet,SQLException> resultProcedure) throws SQLException
SQLExceptionpublic static final boolean execute(Connection connection, String statementString, Object... values) throws SQLException
SQLExceptionpublic static final boolean call(Connection connection, String statementString, Object... values) throws SQLException
SQLExceptionpublic static final boolean call(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> procedure) throws SQLException
SQLExceptionpublic static boolean call(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IProcedure<ResultSet,SQLException> resultProcedure) throws SQLException
SQLExceptionpublic static net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> setterProcedur(Object... objects)
public static int count(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String statementString, Object... values) throws SQLException
SQLExceptionpublic static int count(Connection connection, String statementString, Object... values) throws SQLException
SQLExceptionpublic static Long next(Connection connection, String nextValueStatement) throws SQLException
SQLExceptionpublic static int count(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static boolean containts(Connection connection, String statementString, String columnName, Object value) throws SQLException
SQLExceptionpublic static boolean execute(Connection connection, String statementString) throws SQLException
SQLExceptionpublic static final boolean execute(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> procedure) throws SQLException
SQLExceptionpublic static void execute(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, net.anwiba.commons.lang.functional.IProcedure<Connection,SQLException> procedure) throws SQLException
SQLExceptionpublic static boolean exists(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription)
public static List<Object> update(Connection connection, String statementString, String[] returnColumns, Object... values) throws SQLException
SQLExceptionpublic static List<Object> update(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String updatetStatement, String[] returnColumns, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static List<Object> update(Connection connection, String statementString, String[] returnColumns, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static List<Object> update(Connection connection, String statementString, Object... values) throws SQLException
SQLExceptionpublic static List<Object> update(IDatabaseConnector connector, IJdbcConnectionDescription connectionDescription, String updatetStatement, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static List<Object> update(Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure) throws SQLException
SQLExceptionpublic static <I> net.anwiba.commons.lang.functional.ICloseableConsumer<I,Boolean,SQLException> update(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory, Connection connection, String statementString, net.anwiba.commons.lang.functional.IConverter<I,List<IDatabaseValue>,SQLException> converter)
public static <I> net.anwiba.commons.lang.functional.ICloseableConsumer<I,Boolean,SQLException> update(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory, Connection connection, String statementString, net.anwiba.commons.lang.functional.IAggregator<PreparedStatement,I,Boolean,SQLException> aggregator)
public IDatabaseValue value(Object object, int type)
public IDatabaseValue value(Object object, int type, String typeName)
public static <T> net.anwiba.commons.lang.functional.IClosableIterator<T,SQLException> query(net.anwiba.commons.lang.functional.IFactory<net.anwiba.commons.lang.functional.IBlock<RuntimeException>,net.anwiba.commons.lang.functional.IWatcher,RuntimeException> cancelWatcherFactory, Connection connection, String statementString, net.anwiba.commons.lang.functional.IProcedure<PreparedStatement,SQLException> prepareProcedure, net.anwiba.commons.lang.functional.IConverter<IResult,T,SQLException> converter)
public static String getSchemaName(Connection connection, String schemaName) throws SQLException
SQLExceptionpublic static void createIfNotExists(Connection connection, String schemaName, String tableName, String createStatementString) throws SQLException
SQLExceptionpublic static boolean exists(Connection connection, String schemaName, String tableName) throws SQLException
SQLExceptionpublic static boolean execute(Statement statement, String statementString) throws SQLException
SQLExceptionpublic static String createIdentifierSelectStatement(String tableName, String identifierColumnName, Iterable<String> valueColumnNames)
public static String createIdentifierSelectStatement(String tableName, String identifierColumnName, String orderByColumnName, Iterable<String> valueColumnNames)
public static String[] getTableTypes(DatabaseMetaData metaData, net.anwiba.commons.lang.functional.IApplicable<String> applicableType) throws SQLException
SQLExceptionpublic static boolean create(Connection connection, String statementString) throws SQLException
SQLExceptionpublic static String toString(ResultSet resultSet) throws SQLException
SQLExceptionCopyright © 2007–2017 Andreas W. Bartels. All rights reserved.