- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for transaccions (0.38 sec)
-
finisher_api.go
defer conn.Close() tx.Statement.ConnPool = conn return fc(tx) } // Transaction start a transaction as a block, return error will rollback, otherwise to commit. Transaction executes an // arbitrary number of commands in fc within a transaction. On success the changes are committed; if an error occurs // they are rolled back. func (db *DB) Transaction(fc func(tx *DB) error, opts ...*sql.TxOptions) (err error) { panicked := true
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) -
tests/transaction_test.go
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 { return tx5.First(&User{}, "name = ?", "transaction-2").Error }) }); err != nil { t.Fatalf("prepare statement and nested transcation coexist" + err.Error()) } }) } func TestCancelTransaction(t *testing.T) { ctx := context.Background()
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) -
tests/update_test.go
DB.Migrator().DropTable(&Token{}, &TokenOwner{}) DB.AutoMigrate(&Token{}, &TokenOwner{}) saveTokenOwner := func(owner *TokenOwner) (*TokenOwner, error) { var newOwner TokenOwner if err := DB.Transaction(func(tx *gorm.DB) error { if err := tx.Session(&gorm.Session{FullSaveAssociations: true}).Save(owner).Error; err != nil { return err }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Dec 04 03:50:58 GMT 2023 - 30.3K bytes - Viewed (0) -
gorm.go
) // for Config.cacheStore store PreparedStmtDB key const preparedStmtDBKey = "preparedStmt" // Config GORM config type Config struct { // GORM perform single create, update, delete operations in transactions by default to ensure database data integrity // You can disable it by setting `SkipDefaultTransaction` to true SkipDefaultTransaction bool // NamingStrategy tables, columns naming strategy NamingStrategy schema.Namer
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Aug 20 11:46:56 GMT 2023 - 11.6K bytes - Viewed (0)