Skip to content

Commit

Permalink
modify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tiger committed Nov 7, 2021
1 parent aad2d27 commit 8c21b86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bulk_insert.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ func BulkInsert(db *gorm.DB, objects []interface{}, chunkSize int, excludeColumn
}

// BulkInsertWithReturningValues executes the query to insert multiple records at once.
// This will scan the returned value into `dstValues`.
// It's necessary to set "gorm:insert_option" to execute "returning" query.
// This will scan the returned values into `returnedVals`.
//
// [db] must be set with "gorm:insert_option" to execute RETURNING clause. e.g. db.Set("gorm:insert_option", "RETURNING id")
//
// [objects] must be a slice of struct.
//
Expand Down

0 comments on commit 8c21b86

Please sign in to comment.