Skip to content

Commit f239b5c

Browse files
author
Michal Sitko
authored
Merge pull request #64 from ShiftLeftSecurity/allow-returning-for-insertmulti
Allow returning for insertmulti
2 parents c7e9fee + 8283ea8 commit f239b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db/chain/expressions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func (ec *ExpressionChain) OnConflict(clause func(*OnConflict)) *ExpressionChain
130130
// in many scenarios.
131131
func (ec *ExpressionChain) Returning(args ...string) *ExpressionChain {
132132
if ec.mainOperation == nil ||
133-
(ec.mainOperation.segment != sqlInsert && ec.mainOperation.segment != sqlUpdate) {
133+
(ec.mainOperation.segment != sqlInsert && ec.mainOperation.segment != sqlInsertMulti && ec.mainOperation.segment != sqlUpdate) {
134134
ec.err = append(ec.err, errors.New("Returning is only valid on UPDATE and INSERT statements"))
135135
}
136136
ec.append(

0 commit comments

Comments
 (0)