README.md in mass_insert-0.1.2 vs README.md in mass_insert-0.1.3
- old
+ new
@@ -1,9 +1,9 @@
-# MassInsert [![Build Status](https://travis-ci.org/alejandrogutierrez/mass_insert.png?branch=master)](https://travis-ci.org/alejandrogutierrez/mass_insert)
+# MassInsert [![Build Status](https://travis-ci.org/alejandrogutierrez/mass_insert.png?branch=master)](https://travis-ci.org/alejandrogutierrez/mass_insert) [![Coverage Status](https://coveralls.io/repos/alejandrogutierrez/mass_insert/badge.png)](https://coveralls.io/r/alejandrogutierrez/mass_insert)
This gem aims to provide an easy and faster way to do single database insertions in Rails.
-Support Mysql, PostgreSQL and SQLite3 adapters.
+Support Mysql, PostgreSQL and SQLite3 adapters. It depends on ActiveRecord.
## Installation
Add this line to your application's Gemfile:
@@ -23,11 +23,11 @@
* PostgreSQL - Saving 10,000 records in 0.49s
## Attention
-Since this is a single database insertion your model validation will be ignored, then if you use this gem you need to be sure that information is OK to be persisted.
+Since this is a single database insertion your model validations will be ignored, then if you use this gem you need to be sure that information is OK to be persisted.
## Basic Usage
To use MassInsert gem you need to call mass_insert method from your ActiveRecord model and pass it an array with the values that you want to persist into the database.
@@ -51,11 +51,11 @@
User.mass_insert(values)
## Results
-Sometimes after MassInsert process you need to see some necessary information about the process. MassInsert gem provides a simple way to do it. Just call the next methods from your model after MassInsert execution.
+Sometimes after MassInsert process you need to see information about the process. MassInsert provides a simple way to do it. Just call the next methods from your model after MassInsert execution.
User.mass_insert_results.records # => 120000
Some result options are...
@@ -65,11 +65,11 @@
4. `execution_time` : Returns the time that took to execute the query string that was persisted.
## Options
-MassInsert accepts options hash by second param when you call `mass_insert` from your model. This options allow you to configure the way that the records will be created. Example...
+MassInsert accepts options hash by second param when you call `mass_insert` from your model. These options allow you to configure the way that records will be persisted. Example...
options = {
:some_option => some_value,
:some_option => some_value
}
@@ -82,16 +82,16 @@
Some options you can include are...
**Primary key**
-By default primary key is ignored. If you wish primary key doesn't be ignored you need to pass the `primary_key` option on true. Example...
+By default primary key is generated automatically. If you wish to set primary key manually you need to pass the `primary_key` option on true. Example...
User.mass_insert(values, :primary_key => true)
**Each slice**
-Due you can get a database timeout error you can specify that the insertion will be in batches. You need to pass the `each_slice` option with the records per batch. Example...
+Due you can get a database timeout error you can specify that the insertion will be in batches. Just pass the `each_slice` option with the records per batch. Example...
User.mass_insert(values, :each_slice => 10000)
## Contributing