forked from mirror/gorm
Allow modify statement from dest
This commit is contained in:
parent
cfbcedbf03
commit
4d6b70ec88
|
@ -93,6 +93,10 @@ func (p *processor) Execute(db *DB) *DB {
|
|||
resetBuildClauses = true
|
||||
}
|
||||
|
||||
if optimizer, ok := db.Statement.Dest.(StatementModifier); ok {
|
||||
optimizer.ModifyStatement(stmt)
|
||||
}
|
||||
|
||||
// assign model values
|
||||
if stmt.Model == nil {
|
||||
stmt.Model = stmt.Dest
|
||||
|
|
|
@ -20,6 +20,7 @@ type Builder interface {
|
|||
Writer
|
||||
WriteQuoted(field interface{})
|
||||
AddVar(Writer, ...interface{})
|
||||
AddError(error) error
|
||||
}
|
||||
|
||||
// Clause
|
||||
|
|
Loading…
Reference in New Issue