Package org.dbunit.ext.mssql
Class MsSqlConnection
java.lang.Object
org.dbunit.database.AbstractDatabaseConnection
org.dbunit.database.DatabaseConnection
org.dbunit.ext.mssql.MsSqlConnection
- All Implemented Interfaces:
IDatabaseConnection
DatabaseConnection specialization that configures Microsoft SQL Server-specific
connection behavior.- Since:
- May 19, 2003
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
Constructor Summary
ConstructorsConstructorDescriptionMsSqlConnection(Connection connection) Creates a newMsSqlConnection.MsSqlConnection(Connection connection, String schema) Creates a newMsSqlConnection. -
Method Summary
Modifier and TypeMethodDescriptionCreates a dataset corresponding to the entire database.createDataSet(String[] tableNames) Creates a dataset containing only the specified tables from the database.Methods inherited from class org.dbunit.database.DatabaseConnection
close, getConnection, getSchema, toStringMethods inherited from class org.dbunit.database.AbstractDatabaseConnection
createQueryTable, createTable, createTable, getConfig, getRowCount, getRowCount, getStatementFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.dbunit.database.IDatabaseConnection
createQueryTable, createTable, createTable, getConfig, getRowCount, getRowCount, getStatementFactory
-
Constructor Details
-
MsSqlConnection
Creates a newMsSqlConnection.- Parameters:
connection- the adapted JDBC connectionschema- the database schema- Throws:
DatabaseUnitException- if setting up the connection fails.
-
MsSqlConnection
Creates a newMsSqlConnection.- Parameters:
connection- the adapted JDBC connection- Throws:
DatabaseUnitException- if setting up the connection fails.
-
-
Method Details
-
createDataSet
Description copied from interface:IDatabaseConnectionCreates a dataset corresponding to the entire database.- Specified by:
createDataSetin interfaceIDatabaseConnection- Overrides:
createDataSetin classAbstractDatabaseConnection- Returns:
- the new dataset.
- Throws:
SQLException- if a database access error occurs.
-
createDataSet
Description copied from interface:IDatabaseConnectionCreates a dataset containing only the specified tables from the database.- Specified by:
createDataSetin interfaceIDatabaseConnection- Overrides:
createDataSetin classAbstractDatabaseConnection- Parameters:
tableNames- The tables for which a dataset shall be created- Returns:
- The new dataset
- Throws:
SQLException- if a database access error occurs.DataSetException- if a table intableNamesdoes not exist in the database.
-