org.dbunit.operation
Class TruncateTableOperation
java.lang.Object
org.dbunit.operation.DatabaseOperation
org.dbunit.operation.AbstractOperation
org.dbunit.operation.DeleteAllOperation
org.dbunit.operation.TruncateTableOperation
- public class TruncateTableOperation
- extends DeleteAllOperation
Truncate tables present in the specified dataset. If the dataset does not
contains a particular table, but that table exists in the database,
the database table is not affected. Table are truncated in
reverse sequence.
This operation has the same effect of as DeleteAllOperation
.
TruncateTableOperation is faster, and it is non-logged, meaning it cannot be
rollback. DeleteAllOperation is more portable because not all database vendor
support TRUNCATE_TABLE TABLE statement.
- Since:
- Apr 10, 2003
- Version:
- $Revision: 1.3 $
- Author:
- Manuel Laflamme
- See Also:
DeleteAllOperation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getDeleteAllCommand
protected java.lang.String getDeleteAllCommand()
- Overrides:
getDeleteAllCommand
in class DeleteAllOperation
execute
public void execute(IDatabaseConnection connection,
IDataSet dataSet)
throws DatabaseUnitException,
java.sql.SQLException
- Description copied from class:
DatabaseOperation
- Executes this operation on the specified database using the specified
dataset contents.
- Overrides:
execute
in class DeleteAllOperation
- Throws:
DatabaseUnitException
java.sql.SQLException
Copyright © 2002-2004 DbUnit.org. All Rights Reserved.