mirror of
				https://github.com/DatabaseCleaner/database_cleaner
				synced 2023-03-27 23:22:03 -04:00 
			
		
		
		
	update links to https where available.
This commit is contained in:
		
							parent
							
								
									3d207e429f
								
							
						
					
					
						commit
						b1046de59e
					
				
					 6 changed files with 10 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -62,7 +62,7 @@ Neo4j
 | 
			
		|||
 | 
			
		||||
More details on available configuration options can be found in the README for the specific adapter gem that you're using.
 | 
			
		||||
 | 
			
		||||
For support or to discuss development please use the [Google Group](http://groups.google.com/group/database_cleaner).
 | 
			
		||||
For support or to discuss development please use the [Google Group](https://groups.google.com/group/database_cleaner).
 | 
			
		||||
 | 
			
		||||
## How to use
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -131,7 +131,7 @@ Another approach is to have the transactions rolled back in the application's pr
 | 
			
		|||
 | 
			
		||||
An easier, but slower, solution is to use the `:truncation` or `:deletion` strategy.
 | 
			
		||||
 | 
			
		||||
So what is fastest out of `:deletion` and `:truncation`? Well, it depends on your table structure and what percentage of tables you populate in an average test. The reasoning is out of the scope of this README but here is a [good SO answer on this topic for Postgres](http://stackoverflow.com/questions/11419536/postgresql-truncation-speed/11423886#11423886).
 | 
			
		||||
So what is fastest out of `:deletion` and `:truncation`? Well, it depends on your table structure and what percentage of tables you populate in an average test. The reasoning is out of the scope of this README but here is a [good SO answer on this topic for Postgres](https://stackoverflow.com/questions/11419536/postgresql-truncation-speed/11423886#11423886).
 | 
			
		||||
 | 
			
		||||
Some people report much faster speeds with `:deletion` while others say `:truncation` is faster for them. The best approach therefore is it try all options on your test suite and see what is faster.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ Here is an overview of the supported strategies:
 | 
			
		|||
 | 
			
		||||
(Default strategy is denoted in bold)
 | 
			
		||||
 | 
			
		||||
For support or to discuss development please use the [Google Group](http://groups.google.com/group/database_cleaner).
 | 
			
		||||
For support or to discuss development please use the [Google Group](https://groups.google.com/group/database_cleaner).
 | 
			
		||||
 | 
			
		||||
## What strategy is fastest?
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +49,7 @@ Another approach is to have the transactions rolled back in the application's pr
 | 
			
		|||
 | 
			
		||||
An easier, but slower, solution is to use the `:truncation` or `:deletion` strategy.
 | 
			
		||||
 | 
			
		||||
So what is fastest out of `:deletion` and `:truncation`? Well, it depends on your table structure and what percentage of tables you populate in an average test. The reasoning is out of the scope of this README but here is a [good SO answer on this topic for Postgres](http://stackoverflow.com/questions/11419536/postgresql-truncation-speed/11423886#11423886).
 | 
			
		||||
So what is fastest out of `:deletion` and `:truncation`? Well, it depends on your table structure and what percentage of tables you populate in an average test. The reasoning is out of the scope of this README but here is a [good SO answer on this topic for Postgres](https://stackoverflow.com/questions/11419536/postgresql-truncation-speed/11423886#11423886).
 | 
			
		||||
 | 
			
		||||
Some people report much faster speeds with `:deletion` while others say `:truncation` is faster for them. The best approach therefore is it try all options on your test suite and see what is faster.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,7 +21,7 @@ module DataMapper
 | 
			
		|||
 | 
			
		||||
    class MysqlAdapter < DataObjectsAdapter
 | 
			
		||||
 | 
			
		||||
      # taken from http://github.com/godfat/dm-mapping/tree/master
 | 
			
		||||
      # taken from https://github.com/godfat/dm-mapping/tree/master
 | 
			
		||||
      def storage_names(repository = :default)
 | 
			
		||||
        select 'SHOW TABLES'
 | 
			
		||||
      end
 | 
			
		||||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ module DataMapper
 | 
			
		|||
 | 
			
		||||
    module SqliteAdapterMethods
 | 
			
		||||
 | 
			
		||||
      # taken from http://github.com/godfat/dm-mapping/tree/master
 | 
			
		||||
      # taken from https://github.com/godfat/dm-mapping/tree/master
 | 
			
		||||
      def storage_names(repository = :default)
 | 
			
		||||
        # activerecord-2.1.0/lib/active_record/connection_adapters/sqlite_adapter.rb: 177
 | 
			
		||||
        sql = <<-SQL
 | 
			
		||||
| 
						 | 
				
			
			@ -93,7 +93,7 @@ module DataMapper
 | 
			
		|||
    # maybe codes below gets some postgres/datamapper user going, though.
 | 
			
		||||
    class PostgresAdapter < DataObjectsAdapter
 | 
			
		||||
 | 
			
		||||
      # taken from http://github.com/godfat/dm-mapping/tree/master
 | 
			
		||||
      # taken from https://github.com/godfat/dm-mapping/tree/master
 | 
			
		||||
      def storage_names(repository = :default)
 | 
			
		||||
        sql = <<-SQL
 | 
			
		||||
          SELECT table_name FROM "information_schema"."tables"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ end
 | 
			
		|||
 | 
			
		||||
## Configuration options
 | 
			
		||||
 | 
			
		||||
`:only` and `:except` take a list of strings to be passed to [`keys`](http://redis.io/commands/keys)).
 | 
			
		||||
`:only` and `:except` take a list of strings to be passed to [`keys`](https://redis.io/commands/keys)).
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
  <tbody>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ end
 | 
			
		|||
 | 
			
		||||
## Configuration options
 | 
			
		||||
 | 
			
		||||
`:only` and `:except` take a list of strings to be passed to [`keys`](http://redis.io/commands/keys)).
 | 
			
		||||
`:only` and `:except` take a list of strings to be passed to [`keys`](https://redis.io/commands/keys)).
 | 
			
		||||
 | 
			
		||||
<table>
 | 
			
		||||
  <tbody>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,7 +28,7 @@ Gem::Specification.new do |s|
 | 
			
		|||
  s.files += Dir['lib/**/*.rb']
 | 
			
		||||
  s.files += Dir['adapters/**/lib/**/*.rb']
 | 
			
		||||
 | 
			
		||||
  s.homepage = "http://github.com/DatabaseCleaner/database_cleaner"
 | 
			
		||||
  s.homepage = "https://github.com/DatabaseCleaner/database_cleaner"
 | 
			
		||||
  s.license = 'MIT'
 | 
			
		||||
 | 
			
		||||
  s.rubygems_version = "2.4.5"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue