- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestPreparedStmtInTransaction (0.12 sec)
-
tests/prepared_stmt_test.go
AssertEqual(t, len(conn.Stmts), 2) for _, stmt := range conn.Stmts { if stmt == nil { t.Fatalf("stmt cannot bee nil") } } AssertEqual(t, sqlDB.Stats().InUse, 0) } func TestPreparedStmtInTransaction(t *testing.T) { user := User{Name: "jinzhu"} if err := DB.Transaction(func(tx *gorm.DB) error { tx.Session(&gorm.Session{PrepareStmt: true}).Create(&user) return errors.New("test")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0)