bulk_insert
bulk_insert copied to clipboard
Efficient bulk inserts with ActiveRecord
We have a setup where we occasionally try to bulk import from a database with a schema that is out of sync with the target. If the source database has...
I am using version 1.8.1, ruby 2.3.8, rails 4.2.5 I am trying to use non-block mode, passing an array of attribute hashes. My model is named `Gap`: ``` worker =...
As I just learned, create callbacks does not work when using the gem. Is there any solution for this issue?
rails: 6.0 ruby: 2.7.2 bulk_insert: 1.8.1 used ```ruby WrittenPadQuestion.bulk_insert(.....) do |worker| ..... ..... ..... end ``` app/models/questions.rb xxxxs.rb: ```ruby belongs_to :original_question, optional: true has_many :question_tag_relations, dependent: :destroy has_many :tags, through:...
In https://github.com/jamis/bulk_insert/pull/32, @psloomis did a great job in adding the possibility to retrieve the primary keys inserted in PostGIS and PostgreSQL. However, this requires to manupulate the `Worker` instance directly...
## What's up? Hi there, Thanks for the gem! It's awesome. While I was trying it, I got an error on calling `worker.save!`. ```sh NoMethodError: undefined method `fields' for nil:NilClass...
PostgreSQL supports uppercase in column names, but `Worker` class has a bug with `ON CONFLICT` statement. **Case**: When column name in uppercase or contains uppercase letter, we get error like...
Closes https://github.com/jamis/bulk_insert/issues/50 Alternately I also noticed https://github.com/jamis/bulk_insert/pull/49 which also attempts to fix the same issue but the API interface is slightly different. I could be wrong, but I'm guessing typically...
Column default values like `''` or `false` aren't used when a value is omitted for that column. For example, if I have a table `foo` with a column `bar` that...
Actually for building _update duplicates statement_ used column list from _column_names_ option. Be default for most cases is convenient, but there are some limitations and more flexibility is required. Added...