public interface IDatabaseConnection
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this connection.
|
IDataSet |
createDataSet()
Creates a dataset corresponding to the entire database.
|
IDataSet |
createDataSet(String[] tableNames)
Creates a dataset containing only the specified tables from
the database.
|
ITable |
createQueryTable(String tableName,
String sql)
Creates a table with the result of the specified SQL statement.
|
ITable |
createTable(String tableName)
Creates a table with the result of a
select * from tableName SQL statement. |
ITable |
createTable(String tableName,
PreparedStatement preparedStatement)
Creates a table using the given PreparedStatement to retrieve a ResultSet.
|
DatabaseConfig |
getConfig()
Returns this connection database configuration
|
Connection |
getConnection()
Returns a JDBC database connection.
|
int |
getRowCount(String tableName)
Returns the specified table row count.
|
int |
getRowCount(String tableName,
String whereClause)
Returns the specified table row count according specified where clause.
|
String |
getSchema()
Returns the database schema name.
|
IStatementFactory |
getStatementFactory()
Deprecated.
Use
getConfig() |
Connection getConnection() throws SQLException
SQLException
String getSchema()
void close() throws SQLException
SQLException
IDataSet createDataSet() throws SQLException
SQLException
IDataSet createDataSet(String[] tableNames) throws SQLException, DataSetException
tableNames
- The tables for which a dataset shall be createdSQLException
DataSetException
ITable createQueryTable(String tableName, String sql) throws DataSetException, SQLException
tableName
- The name to be returned by ITableMetaData.getTableName()
.sql
- The SQL SELECT
statementDataSetException
SQLException
ITable createTable(String tableName, PreparedStatement preparedStatement) throws DataSetException, SQLException
tableName
- The name to be returned by ITableMetaData.getTableName()
.preparedStatement
- The statement to be executed as queryDataSetException
SQLException
ITable createTable(String tableName) throws DataSetException, SQLException
select * from tableName
SQL statement.tableName
- The name of the database table to be queried which is also returned by
ITableMetaData.getTableName()
.DataSetException
SQLException
int getRowCount(String tableName) throws SQLException
tableName
- the table nameSQLException
int getRowCount(String tableName, String whereClause) throws SQLException
tableName
- the table namewhereClause
- the where clauseSQLException
DatabaseConfig getConfig()
IStatementFactory getStatementFactory()
getConfig()
Copyright © 2002–2015. All rights reserved.