I'm using gorm to populate my DB with a bunch of info from a file. It would be awesome, for performance reasons, if I could insert a whole slice with one INSERT SQL statement.
+1 I am doing something similar by parsing a CSV of records.
I don't like this idea because it won't run callbacks, and save associations...
I can imagine many people will misuse this feature when have it. So maybe better write your own sql to do this job?
@jinzhu for Postgres, which uses positional arguments rather than ? for inserts, how do you recommend we build the bulk insert statement?
@calebthompson have a look at python/django orm, they already have this feature
Most helpful comment
+1 I am doing something similar by parsing a CSV of records.