Bulk insert support in Rails 6
15-Apr-2019 1781
All of these new methods allow inserting multiple records of the same model into the database. A single INSERT SQL query is prepared by these methods and a single sql statement is sent to the database without instantiating the model or invoking Active Record callbacks or validations.During bulk insertion, violation of primary key, violation of unique indexes and violation of unique constraints is possible. Rails leverages database-specific features to either skip or upsert the duplicates depending on the case.
Bulk insert support in Rails 6 #ruby #rubydeveloper #rubyonrails #insert #support #Rails https://rubyonrails.ba/link/bulk-insert-support-in-rails-6