mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
updates README to include new sequel adapter info
This commit is contained in:
parent
b3eefb7219
commit
501025b9de
1 changed files with 10 additions and 8 deletions
|
@ -5,7 +5,7 @@ The original use case was to ensure a clean state during tests. Each strategy
|
||||||
is a small amount of code but is code that is usually needed in any ruby app
|
is a small amount of code but is code that is usually needed in any ruby app
|
||||||
that is testing with a database.
|
that is testing with a database.
|
||||||
|
|
||||||
ActiveRecord, DataMapper, MongoMapper, Mongoid, and CouchPotato are supported.
|
ActiveRecord, DataMapper, Sequel, MongoMapper, Mongoid, and CouchPotato are supported.
|
||||||
|
|
||||||
Here is an overview of the strategies supported for each library:
|
Here is an overview of the strategies supported for each library:
|
||||||
|
|
||||||
|
@ -14,13 +14,14 @@ Here is an overview of the strategies supported for each library:
|
||||||
| DataMapper | Yes | **Yes** | No |
|
| DataMapper | Yes | **Yes** | No |
|
||||||
| CouchPotato | **Yes** | No | No |
|
| CouchPotato | **Yes** | No | No |
|
||||||
| MongoMapper | **Yes** | No | No |
|
| MongoMapper | **Yes** | No | No |
|
||||||
| Mongoid | **Yes** | No | No |
|
| Sequel | **Yes** | Yes | No |
|
||||||
|
|
||||||
(Default strategy for each library is denoted in bold)
|
(Default strategy for each library is denoted in bold)
|
||||||
|
|
||||||
The ActiveRecord @:deletion@ strategy is only useful for when the @:truncation@ strategy causes
|
The ActiveRecord @:deletion@ strategy is useful for when the @:truncation@ strategy causes
|
||||||
locks (as reported by some Oracle DB users). The @:truncation@ strategy is the preferred option
|
locks (as reported by some Oracle DB users). The @:deletion@ option has been reported to
|
||||||
since it is much faster.
|
be faster than @:truncation@ in some cases as well. In general, the best approach is to use
|
||||||
|
@:transaction@ since it is the fastest.
|
||||||
|
|
||||||
Database Cleaner also includes a @null@ strategy (that does no cleaning at all) which can be used
|
Database Cleaner also includes a @null@ strategy (that does no cleaning at all) which can be used
|
||||||
with any ORM library. You can also explicitly use it by setting your strategy to @nil@.
|
with any ORM library. You can also explicitly use it by setting your strategy to @nil@.
|
||||||
|
@ -161,6 +162,7 @@ Configuration options
|
||||||
| Mongo Mapper | DatabaseCleaner[:mongo_mapper] | Multiple connections not yet supported |
|
| Mongo Mapper | DatabaseCleaner[:mongo_mapper] | Multiple connections not yet supported |
|
||||||
| Mongoid | DatabaseCleaner[:mongoid] | Multiple connections not yet supported |
|
| Mongoid | DatabaseCleaner[:mongoid] | Multiple connections not yet supported |
|
||||||
| Couch Potato | DatabaseCleaner[:couch_potato] | Multiple connections not yet supported |
|
| Couch Potato | DatabaseCleaner[:couch_potato] | Multiple connections not yet supported |
|
||||||
|
| Sequel | DatabaseCleaner[:sequel] | ? |
|
||||||
|
|
||||||
h2. Why?
|
h2. Why?
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue