- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for preparedStmt (0.28 sec)
-
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, } }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sun Aug 20 11:46:56 GMT 2023 - 11.6K bytes - Viewed (0) -
tests/prepared_stmt_test.go
"time" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestPreparedStmt(t *testing.T) { 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)
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu Mar 21 07:55:43 GMT 2024 - 4K 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 {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Sat Jun 10 13:05:19 GMT 2023 - 10.9K bytes - Viewed (0) -
tests/migrate_test.go
} } func TestInvalidCachedPlanPrepareStmt(t *testing.T) { if DB.Dialector.Name() != "postgres" { return } db, err := gorm.Open(postgres.Open(postgresDSN), &gorm.Config{PrepareStmt: true}) if err != nil { t.Errorf("Open err:%v", err) } if debug := os.Getenv("DEBUG"); debug == "true" { db.Logger = db.Logger.LogMode(logger.Info) } else if debug == "false" {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Mar 18 11:24:16 GMT 2024 - 56.2K bytes - Viewed (0)