- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for executeScopes (0.25 sec)
-
migrator.go
"gorm.io/gorm/schema" ) // Migrator returns migrator func (db *DB) Migrator() Migrator { tx := db.getInstance() // apply scopes to migrator for len(tx.Statement.scopes) > 0 { tx = tx.executeScopes() } return tx.Dialector.Migrator(tx.Session(&Session{})) } // AutoMigrate run auto migration for given models func (db *DB) AutoMigrate(dst ...interface{}) error { return db.Migrator().AutoMigrate(dst...)
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 3.1K bytes - Viewed (0) -
callbacks.go
} func (cs *callbacks) Raw() *processor { return cs.processors["raw"] } func (p *processor) Execute(db *DB) *DB { // call scopes for len(db.Statement.scopes) > 0 { db = db.executeScopes() } var ( curTime = time.Now() stmt = db.Statement resetBuildClauses bool ) if len(stmt.BuildClauses) == 0 { stmt.BuildClauses = p.Clauses
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 26 06:24:29 UTC 2025 - 8.8K bytes - Viewed (0) -
chainable_api.go
func (db *DB) Scopes(funcs ...func(*DB) *DB) (tx *DB) { tx = db.getInstance() tx.Statement.scopes = append(tx.Statement.scopes, funcs...) return tx } func (db *DB) executeScopes() (tx *DB) { scopes := db.Statement.scopes db.Statement.scopes = nil for _, scope := range scopes { db = scope(db) } return db } // Preload preload associations with given conditions
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 14.8K bytes - Viewed (0) -
statement.go
curTable := stmt.Table if curTable == "" { curTable = clause.CurrentTable } switch v := arg.(type) { case clause.Expression: conds = append(conds, v) case *DB: v.executeScopes() if cs, ok := v.Statement.Clauses["WHERE"]; ok { if where, ok := cs.Expression.(clause.Where); ok { if len(where.Exprs) == 1 { if orConds, ok := where.Exprs[0].(clause.OrConditions); ok {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 20.8K bytes - Viewed (0)