activerecord-import
activerecord-import copied to clipboard
Support returning `ids` for mysql too
According to this: https://stackoverflow.com/questions/7333524/how-can-i-insert-many-rows-into-a-mysql-table-and-return-the-new-ids
It is possible to compute the inserted IDs on mysql and returning in the ids field of the result like it is done for Postgres.
It would be a great improvement as it is very useful to be able to get the list of records that just got inserted and there is no easy way to do it manually: the only way is to manually loop on the bulk imported data and .find_by each record
That has been discussed here: https://github.com/zdennis/activerecord-import/pull/279