Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for rakish (0.26 sec)

  1. tests/query_test.go

    	DB.Create(&user)
    
    	var result User
    	if DB.Where("").Where("").First(&result).Error != nil {
    		t.Errorf("Should not raise any error if searching with empty strings")
    	}
    
    	result = User{}
    	if DB.Where(&User{}).Where("name = ?", user.Name).First(&result).Error != nil {
    		t.Errorf("Should not raise any error if searching with empty struct")
    	}
    
    	result = User{}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  2. tests/joins_test.go

    	if db5.Error != nil {
    		t.Errorf("Should not raise error for join where identical fields in different tables. Error: %s", db5.Error.Error())
    	}
    
    	var users6 []User
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 15K bytes
    - Viewed (0)
  3. tests/transaction_test.go

    	user := User{Name: "transaction"}
    	if err := tx.Save(&user).Error; err != nil {
    		t.Fatalf("No error should raise")
    	}
    
    	if err := tx.Commit().Error; err != nil {
    		t.Fatalf("Commit should not raise error")
    	}
    
    	if err := tx.Rollback().Error; err == nil {
    		t.Fatalf("Rollback after commit should raise error")
    	}
    }
    
    func TestTransactionWithSavePoint(t *testing.T) {
    	tx := DB.Begin()
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top