- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for prepared_stmt (0.06 sec)
-
tests/prepared_stmt_test.go
tx := DB.Session(&gorm.Session{PrepareStmt: true}) 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)
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Apr 25 08:22:26 UTC 2025 - 8K bytes - Viewed (0) -
gorm.go
db.cacheStore.Store(preparedStmtDBKey, preparedStmt) } switch t := tx.Statement.ConnPool.(type) { case Tx: tx.Statement.ConnPool = &PreparedStmtTX{ Tx: t, PreparedStmtDB: preparedStmt, } default: tx.Statement.ConnPool = &PreparedStmtDB{ ConnPool: db.Config.ConnPool, Mux: preparedStmt.Mux, Stmts: preparedStmt.Stmts, } }
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 26 06:24:29 UTC 2025 - 12.8K bytes - Viewed (0) -
prepare_stmt.go
Zhaodong Xie <******@****.***> 1745569346 +0800
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Fri Apr 25 08:22:26 UTC 2025 - 5.7K bytes - Viewed (0) -
tests/transaction_test.go
t.Fatalf("Should be able to find committed record, but got %v", err) } t.Run("this is test nested transaction and prepareStmt coexist case", func(t *testing.T) { // enable prepare statement tx3 := DB.Session(&gorm.Session{PrepareStmt: true}) if err := tx3.Transaction(func(tx4 *gorm.DB) error { // nested transaction return tx4.Transaction(func(tx5 *gorm.DB) error {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun May 25 07:40:40 UTC 2025 - 13.3K bytes - Viewed (0)