We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c7e9fee + 8283ea8 commit f239b5cCopy full SHA for f239b5c
db/chain/expressions.go
@@ -130,7 +130,7 @@ func (ec *ExpressionChain) OnConflict(clause func(*OnConflict)) *ExpressionChain
130
// in many scenarios.
131
func (ec *ExpressionChain) Returning(args ...string) *ExpressionChain {
132
if ec.mainOperation == nil ||
133
- (ec.mainOperation.segment != sqlInsert && ec.mainOperation.segment != sqlUpdate) {
+ (ec.mainOperation.segment != sqlInsert && ec.mainOperation.segment != sqlInsertMulti && ec.mainOperation.segment != sqlUpdate) {
134
ec.err = append(ec.err, errors.New("Returning is only valid on UPDATE and INSERT statements"))
135
}
136
ec.append(
0 commit comments