Advanced Query | GORM - The fantastic ORM library for Golang, aims to be developer friendly. https://gorm.io/docs/advanced_query.html
db.Clauses(clause.Locking{Strength: "UPDATE"}).Find(&users)// SELECT * FROM `users` FOR UPDATEdb.Clauses(clause.Locking{ Strength: "SHARE", Table: clause.Table{Name: clause.CurrentTable},}).Find(&users)// SELECT * FROM `users` FOR SHARE OF `users`db.Clauses(clause.Locking{ Strength: "UPDATE", Options: "NOWAIT",}).Find(&users)// SELECT * FROM `users` FOR UPDATE NOWAIT