Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSubQueryWithRaw (0.11 sec)

  1. tests/query_test.go

    		Select("AVG(age)").Table("users").Where("name LIKE ?", "subquery%")).Find(&users)
    
    	if len(users) != 2 {
    		t.Errorf("Two users should be found, instead found %d", len(users))
    	}
    }
    
    func TestSubQueryWithRaw(t *testing.T) {
    	users := []User{
    		{Name: "subquery_raw_1", Age: 10},
    		{Name: "subquery_raw_2", Age: 20},
    		{Name: "subquery_raw_3", Age: 30},
    		{Name: "subquery_raw_4", Age: 40},
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 24 09:42:59 UTC 2024
    - 50.4K bytes
    - Viewed (0)
Back to top