Dbunit中DatabaseOperation.DELETE和DatabaseOperation.DELETE_ALL的差别
来源:互联网 发布:评价红模仿 知乎 编辑:程序博客网 时间:2024/05/16 23:55
DatabaseOperation.DELETE
This operation deletes only the dataset contents from the database. This operation does not delete the entire table contents but only data that are present in the dataset.
DatabaseOperation.DELETE_ALL Deletes all rows of 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.
DatabaseOperation.CLEAN_INSERT This composite operation performs a DELETE_ALL operation followed by an INSERT operation. This is the safest approach to ensure that the database is in a known state. This is appropriate for tests that require the database to only contain a specific set of data.
以上信息来自http://dbunit.sourceforge.net/components.html
从上开始看出,
DatabaseOperation.DELETE 只删除数据集文件中准备的数据.不删除你另外插入的数据
DatabaseOperation.DELETE_ALL 将删除数据集文件中出现的表中的所有数据,也就是如果你往数据集表中插入了数据,那么也会删除.表本身不会被删除.而且表会被trucate
另外:DatabaseOperation.CLEAN_INSERT是DELETE_ALL和 INSERT的绑定.
This operation deletes only the dataset contents from the database. This operation does not delete the entire table contents but only data that are present in the dataset.
DatabaseOperation.DELETE_ALL Deletes all rows of 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.
DatabaseOperation.CLEAN_INSERT This composite operation performs a DELETE_ALL operation followed by an INSERT operation. This is the safest approach to ensure that the database is in a known state. This is appropriate for tests that require the database to only contain a specific set of data.
以上信息来自http://dbunit.sourceforge.net/components.html
从上开始看出,
DatabaseOperation.DELETE 只删除数据集文件中准备的数据.不删除你另外插入的数据
DatabaseOperation.DELETE_ALL 将删除数据集文件中出现的表中的所有数据,也就是如果你往数据集表中插入了数据,那么也会删除.表本身不会被删除.而且表会被trucate
另外:DatabaseOperation.CLEAN_INSERT是DELETE_ALL和 INSERT的绑定.
- Dbunit中DatabaseOperation.DELETE和DatabaseOperation.DELETE_ALL的差别
- DatabaseOperation
- Rails中destroy_all和delete_all的差别
- 关于C++中delete和delete[]的差别
- C++中 delete 与 delete[]的差别
- 数据库中truncate与delete的差别和联系?
- 一个关于c++字符串处理和delete[]与delete差别的问题
- C++中delete和delete[] 的区别
- C++中delete和delete[] 的区别
- C++中delete和delete[] 的区别
- C++中delete和delete[]的区别
- C++中delete和delete[]的区别
- C++中delete和delete[]的区别
- C++中delete和delete[]的区别
- C++中delete和delete[]的区别
- C++中delete和delete[]的区别
- C++中delete和delete[]的区别
- C++中delete和delete[]的区别
- 态度
- 记住这些,或许可以救你一命!!
- Win2000 professional 下枚举全局钩子
- 使用SQL产生BCP命令快速备份/恢复你所有数据
- 老婆的最后一条短信----(真的很感人)
- Dbunit中DatabaseOperation.DELETE和DatabaseOperation.DELETE_ALL的差别
- 留给自己的生活
- 俱往矣,后面的路如何走...?有一条捷径...
- 使用标注(annotations)而不是xml来作为系统配置
- [交流]当GridView+SqlDataSource遇上UniqueIdentifier
- 函数返回值的疑问
- MySql 命令应用
- Msinfmgr和Autorun.inf病毒火热流行!
- 常用软件下载地址(网络资源无限)