- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for fc (0.06 sec)
-
finisher_api.go
} defer conn.Close() tx.Statement.ConnPool = conn return fc(tx) } // Transaction start a transaction as a block, return error will rollback, otherwise to commit. Transaction executes an // arbitrary number of commands in fc within a transaction. On success the changes are committed; if an error occurs // they are rolled back. func (db *DB) Transaction(fc func(tx *DB) error, opts ...*sql.TxOptions) (err error) { panicked := true
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 26 06:24:29 UTC 2025 - 22.9K bytes - Viewed (0) -
schema/schema.go
if fc, ok := fieldValue.(CreateClausesInterface); ok { field.Schema.CreateClauses = append(field.Schema.CreateClauses, fc.CreateClauses(field)...) } if fc, ok := fieldValue.(QueryClausesInterface); ok { field.Schema.QueryClauses = append(field.Schema.QueryClauses, fc.QueryClauses(field)...) } if fc, ok := fieldValue.(UpdateClausesInterface); ok {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 19 06:35:49 UTC 2025 - 12.9K bytes - Viewed (0) -
generics.go
ops: append(append([]op(nil), c.g.ops...), v), }}, } } func (c chainG[T]) Scopes(scopes ...func(db *Statement)) ChainInterface[T] { return c.with(func(db *DB) *DB { for _, fc := range scopes { fc(db.Statement) } return db }) } func (c chainG[T]) Table(name string, args ...interface{}) ChainInterface[T] { return c.with(func(db *DB) *DB { return db.Table(name, args...) })
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 15.5K bytes - Viewed (0) -
migrator/migrator.go
gorm.Dialector } type printSQLLogger struct { logger.Interface } func (l *printSQLLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) { sql, _ := fc() fmt.Println(sql + ";") l.Interface.Trace(ctx, begin, fc, err) } // GormDataTypeInterface gorm data type interface type GormDataTypeInterface interface { GormDBDataType(*gorm.DB, *schema.Field) string }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Jun 06 02:35:01 UTC 2025 - 29.5K bytes - Viewed (0) -
callbacks/preload.go
if len(values) != 0 { tx = tx.Model(reflectResults.Addr().Interface()).Where(clause.IN{Column: column, Values: values}) for _, cond := range conds { if fc, ok := cond.(func(*gorm.DB) *gorm.DB); ok { tx = fc(tx) } else { inlineConds = append(inlineConds, cond) } } if len(inlineConds) > 0 { tx = tx.Where(inlineConds[0], inlineConds[1:]...) }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 11.7K bytes - Viewed (0) -
tests/preload_test.go
DB.Create(&users) query := make([]string, 0) sess := DB.Session(&gorm.Session{Logger: Tracer{ Logger: DB.Config.Logger, Test: func(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) { sql, _ := fc() query = append(query, sql) }, }}) var result []User err := sess. Joins("Manager"). Preload("Manager.Tools").
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0)