GORM: Batch Operations
GORM is the ORM library for Golang, built and maintained by Jinzhu. Since you have stumbled upon this article I would safely assume that you have been coding using GoLang for a while now and are a GORM user already.
I have been working with gorm for a while now and recently had a use case where I wanted to perform bulk writes to MySQL database. Upon exploring the documentation, I found that gorm doesn’t support bulk writes/updates (in V1). I went through the open items on their GitHub repo and found some helpful comments which led me to write this small function, which supports batch upserts for GORM.
Update: GORM V2 provides bulk operations out of the box.
Please find all of my gorm-plugin listed here.