Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestDeeplyNestedTransactionWithBlockAndWrappedCallback (0.59 sec)

  1. tests/transaction_test.go

    		t.Fatalf("Should not find rollbacked record")
    	}
    
    	if err := DB.First(&User{}, "name = ?", user2.Name).Error; err != nil {
    		t.Fatalf("Should find saved record")
    	}
    }
    
    func TestDeeplyNestedTransactionWithBlockAndWrappedCallback(t *testing.T) {
    	transaction := func(ctx context.Context, db *gorm.DB, callback func(ctx context.Context, db *gorm.DB) error) error {
    		return db.WithContext(ctx).Transaction(func(tx *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)
Back to top