- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for committer (0.18 sec)
-
finisher_api.go
func (db *DB) Commit() *DB { if committer, ok := db.Statement.ConnPool.(TxCommitter); ok && committer != nil && !reflect.ValueOf(committer).IsNil() { db.AddError(committer.Commit()) } else { db.AddError(ErrInvalidTransaction) } return db } // Rollback rollbacks the changes in a transaction func (db *DB) Rollback() *DB { if committer, ok := db.Statement.ConnPool.(TxCommitter); ok && committer != nil {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Jan 12 08:42:21 GMT 2024 - 22.7K bytes - Viewed (0) -
interfaces.go
type ConnPoolBeginner interface { BeginTx(ctx context.Context, opts *sql.TxOptions) (ConnPool, error) } // TxCommitter tx committer type TxCommitter interface { Commit() error Rollback() error } // Tx sql.Tx interface type Tx interface { ConnPool TxCommitter StmtContext(ctx context.Context, stmt *sql.Stmt) *sql.Stmt } // Valuer gorm valuer interface type Valuer interface {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Aug 19 13:33:31 GMT 2023 - 2.2K bytes - Viewed (0) -
tests/connpool_test.go
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Feb 06 02:54:40 GMT 2024 - 5.5K bytes - Viewed (0) -
tests/transaction_test.go
t.Fatalf("Should find saved record, but got %v", err) } tx2.Commit() if err := DB.First(&User{}, "name = ?", "transaction-2").Error; err != nil { 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})
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)