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
SQLExceptionString getSchema()
void close()
throws SQLException
SQLExceptionIDataSet createDataSet() throws SQLException
SQLExceptionIDataSet createDataSet(String[] tableNames) throws SQLException, DataSetException
tableNames - The tables for which a dataset shall be createdSQLExceptionDataSetExceptionITable createQueryTable(String tableName, String sql) throws DataSetException, SQLException
tableName - The name to be returned by ITableMetaData.getTableName().sql - The SQL SELECT statementDataSetExceptionSQLExceptionITable createTable(String tableName, PreparedStatement preparedStatement) throws DataSetException, SQLException
tableName - The name to be returned by ITableMetaData.getTableName().preparedStatement - The statement to be executed as queryDataSetExceptionSQLExceptionITable 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().DataSetExceptionSQLExceptionint getRowCount(String tableName) throws SQLException
tableName - the table nameSQLExceptionint getRowCount(String tableName, String whereClause) throws SQLException
tableName - the table namewhereClause - the where clauseSQLExceptionDatabaseConfig getConfig()
IStatementFactory getStatementFactory()
getConfig()Copyright © 2002-2017. All Rights Reserved.