Skip to content

Commit a406dad

Browse files
committed
TIL Gems: Bulk Insert to database with just one Query
By chances, I stood upon this gem call `BulkInsert`. As ActiveRecord doesn't cater to multiple inserting of query into one query. This gem consolidate all the query into one single query and insert to the database. Use-case for this, I can think of dbseed and import function where there a need to insert multiple query for the same model. More information is available at [Github](https://github.com/jamis/bulk_insert) on how to use it etc..
1 parent 8590a8e commit a406dad

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Bulk Insert to database with just one Query
2+
3+
By chances, I stood upon this gem call `BulkInsert`.
4+
5+
As ActiveRecord doesn't cater to multiple inserting of query into one query.
6+
7+
This gem consolidate all the query into one single query and insert to the database.
8+
9+
Use-case for this, I can think of dbseed and import function where there a need to insert multiple query for the same model.
10+
11+
More information is available at [Github](https://github.com/jamis/bulk_insert) on how to use it etc..

0 commit comments

Comments
 (0)