- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 48 for tx (0.02 sec)
-
cmd/bucket-stats.go
LastFailedCount: atomic.LoadUint64(&r.mrfStats.LastFailedCount), } r.RLock() defer r.RUnlock() tx := newXferStats() for _, brs := range r.Cache { for _, v := range brs.Stats { tx := tx.merge(*v.XferRateLrg) tx = tx.merge(*v.XferRateSml) } } qs.XferStats[Total] = *tx return qs } // ReplicationQueueStats holds overall queue stats for replication
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 11:39:51 UTC 2024 - 13.4K bytes - Viewed (0) -
callbacks/callmethod.go
package callbacks import ( "reflect" "gorm.io/gorm" ) func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) { tx := db.Session(&gorm.Session{NewDB: true}) if called := fc(db.Statement.ReflectValue.Interface(), tx); !called { switch db.Statement.ReflectValue.Kind() { case reflect.Slice, reflect.Array: db.Statement.CurDestIndex = 0 for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Feb 18 01:20:29 UTC 2023 - 846 bytes - Viewed (0) -
tests/scanner_valuer_test.go
ExampleStructPtr: &ExampleStruct{"name", "value2"}, } var result ScannerValuerStruct tx := DB.Where(data).FirstOrCreate(&result) if tx.RowsAffected != 1 { t.Errorf("RowsAffected should be 1 after create some record") } if tx.Error != nil { t.Errorf("Should not raise any error, but got %v", tx.Error) } AssertObjEqual(t, result, data, "Name", "Gender", "Age")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 07 07:02:07 UTC 2023 - 10.6K bytes - Viewed (0) -
tests/connection_test.go
setSQL, getSQL := getSetSQL(DB.Dialector.Name()) if len(setSQL) == 0 || len(getSQL) == 0 { return } err := DB.Connection(func(tx *gorm.DB) error { if err := tx.Exec(setSQL, expectedName).Error; err != nil { return err } if err := tx.Raw(getSQL).Scan(&actualName).Error; err != nil { return err } return nil }) if err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 28 14:16:42 UTC 2022 - 963 bytes - Viewed (0) -
tests/associations_has_many_test.go
Contents []ItemContent `gorm:"foreignKey:ItemID"` } tx := DB.Session(&gorm.Session{}) tx.Migrator().DropTable(&ItemContent{}, &Item{}) tx.AutoMigrate(&ItemContent{}, &Item{}) item := Item{ Logo: "logo", Contents: []ItemContent{ {Name: "name", LanguageCode: "en"}, {Name: "ar name", LanguageCode: "ar"}, }, } if err := tx.Create(&item).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 16K bytes - Viewed (0) -
tests/count_test.go
if count1 != 1 || count2 != 3 { t.Errorf("multiple count in chain should works") } tx := DB.Model(&User{}).Where("name = ?", user1.Name).Session(&gorm.Session{}) tx.Count(&count1) tx.Or("name in ?", []string{user2.Name, user3.Name}).Count(&count2) if count1 != 1 || count2 != 3 { t.Errorf("count after new session should works") } var count3 int64
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 6.9K bytes - Viewed (0) -
callbacks/query.go
for _, join := range db.Statement.Joins { joins = append(joins, join.Name) } tx := preloadDB(db, db.Statement.ReflectValue, db.Statement.Dest) if tx.Error != nil { return } db.AddError(preloadEntryPoint(tx, joins, &tx.Statement.Schema.Relationships, db.Statement.Preloads, db.Statement.Preloads[clause.Associations])) } } func AfterQuery(db *gorm.DB) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 10.1K bytes - Viewed (1) -
callbacks/create.go
callMethod(db, func(value interface{}, tx *gorm.DB) (called bool) { if db.Statement.Schema.BeforeSave { if i, ok := value.(BeforeSaveInterface); ok { called = true db.AddError(i.BeforeSave(tx)) } } if db.Statement.Schema.BeforeCreate { if i, ok := value.(BeforeCreateInterface); ok { called = true db.AddError(i.BeforeCreate(tx)) } } return called }) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 08 03:29:55 UTC 2024 - 12.5K bytes - Viewed (0) -
api/go1.8.txt
pkg database/sql, method (*Tx) ExecContext(context.Context, string, ...interface{}) (Result, error) pkg database/sql, method (*Tx) PrepareContext(context.Context, string) (*Stmt, error) pkg database/sql, method (*Tx) QueryContext(context.Context, string, ...interface{}) (*Rows, error) pkg database/sql, method (*Tx) QueryRowContext(context.Context, string, ...interface{}) *Row
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Dec 21 05:25:57 UTC 2016 - 16.3K bytes - Viewed (0) -
callbacks/helper.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 14 12:32:57 UTC 2022 - 3.7K bytes - Viewed (0)