public class InsertIdentityOperation extends AbstractOperation
If you are using the Microsoft driver (i.e.
com.microsoft.jdbc.sqlserver.SQLServerDriver), you'll need to
use the SelectMethod=cursor parameter in the JDBC connection
string. Your databaseUrl would look something like the following:
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb;SelectMethod=cursor
Thanks to Jeremy Stein who has submitted multiple patches.
| Modifier and Type | Field and Description |
|---|---|
static DatabaseOperation |
CLEAN_INSERT |
static DatabaseOperation |
INSERT |
static String |
PROPERTY_IDENTITY_COLUMN_FILTER |
static DatabaseOperation |
REFRESH |
DELETE, DELETE_ALL, NONE, TRUNCATE_TABLE, UPDATE| Constructor and Description |
|---|
InsertIdentityOperation(DatabaseOperation operation)
Creates a new InsertIdentityOperation object that decorates the
specified operation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(IDatabaseConnection connection,
IDataSet dataSet)
Executes this operation on the specified database using the specified
dataset contents.
|
getQualifiedNameCLOSE_CONNECTION, TRANSACTIONpublic static final String PROPERTY_IDENTITY_COLUMN_FILTER
public static final DatabaseOperation INSERT
public static final DatabaseOperation CLEAN_INSERT
public static final DatabaseOperation REFRESH
public InsertIdentityOperation(DatabaseOperation operation)
public void execute(IDatabaseConnection connection, IDataSet dataSet) throws DatabaseUnitException, SQLException
DatabaseOperationexecute in class DatabaseOperationconnection - the database connection.dataSet - the dataset to be used by this operation.DatabaseUnitExceptionSQLExceptionCopyright © 2002-2012. All Rights Reserved.