- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for BeginTx (0.1 sec)
-
tests/connpool_test.go
return c.db.Ping() } // If you use BeginTx returned *sql.Tx as shown below then you can't record queries in a transaction. // // func (c *wrapperConnPool) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) { // return c.db.BeginTx(ctx, opts) // } // // You should use BeginTx returned gorm.Tx which could wrap *sql.Tx then you can record all queries.
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Feb 06 02:54:40 UTC 2024 - 5.5K bytes - Viewed (0) -
interfaces.go
SavePoint(tx *DB, name string) error RollbackTo(tx *DB, name string) error } // TxBeginner tx beginner type TxBeginner interface { BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) } // ConnPoolBeginner conn pool beginner type ConnPoolBeginner interface { BeginTx(ctx context.Context, opts *sql.TxOptions) (ConnPool, error) } // TxCommitter tx committer type TxCommitter interface { Commit() error
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Aug 19 13:33:31 UTC 2023 - 2.2K bytes - Viewed (0) -
prepare_stmt.go
} db.Mux.Lock() cacheStmt.Stmt = stmt db.Mux.Unlock() return cacheStmt, nil } func (db *PreparedStmtDB) BeginTx(ctx context.Context, opt *sql.TxOptions) (ConnPool, error) { if beginner, ok := db.ConnPool.(TxBeginner); ok { tx, err := beginner.BeginTx(ctx, opt) return &PreparedStmtTX{PreparedStmtDB: db, Tx: tx}, err } beginner, ok := db.ConnPool.(ConnPoolBeginner) if !ok {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 6.6K bytes - Viewed (0)