Skip to content

Commit 4d6b70e

Browse files
committedFeb 2, 2023
Allow modify statement from dest
1 parent cfbcedb commit 4d6b70e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
 

‎callbacks.go

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ func (p *processor) Execute(db *DB) *DB {
9393
resetBuildClauses = true
9494
}
9595

96+
if optimizer, ok := db.Statement.Dest.(StatementModifier); ok {
97+
optimizer.ModifyStatement(stmt)
98+
}
99+
96100
// assign model values
97101
if stmt.Model == nil {
98102
stmt.Model = stmt.Dest

‎clause/clause.go

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type Builder interface {
2020
Writer
2121
WriteQuoted(field interface{})
2222
AddVar(Writer, ...interface{})
23+
AddError(error) error
2324
}
2425

2526
// Clause

0 commit comments

Comments
 (0)
Please sign in to comment.