Clear scopes before invoke scopes methods

This commit is contained in:
Jinzhu 2021-03-08 19:21:09 +08:00
parent 0348b1d3c1
commit 675de6fc16
1 changed files with 3 additions and 2 deletions

View File

@ -109,10 +109,11 @@ func (p *processor) Execute(db *DB) {
} }
// call scopes // call scopes
for _, scope := range stmt.scopes { scopes := stmt.scopes
stmt.scopes = nil
for _, scope := range scopes {
db = scope(db) db = scope(db)
} }
stmt.scopes = nil
for _, f := range p.fns { for _, f := range p.fns {
f(db) f(db)