- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for CANCEL (0.16 sec)
-
tests/prepared_stmt_test.go
if _, ok := tx.ConnPool.(*gorm.PreparedStmtDB); !ok { t.Fatalf("should assign PreparedStatement Manager back to database when using PrepareStmt mode") } ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) defer cancel() txCtx := tx.WithContext(ctx) user := *GetUser("prepared_stmt", Config{}) txCtx.Create(&user) var result1 User
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 07:55:43 GMT 2024 - 4K bytes - Viewed (0) -
tests/transaction_test.go
} }) } func TestCancelTransaction(t *testing.T) { ctx := context.Background() ctx, cancelFunc := context.WithCancel(ctx) cancelFunc() user := *GetUser("cancel_transaction", Config{}) DB.Create(&user) err := DB.WithContext(ctx).Transaction(func(tx *gorm.DB) error { var result User tx.First(&result, user.ID) return nil }) if err == nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Jun 10 13:05:19 GMT 2023 - 10.9K bytes - Viewed (0)