Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for FirstMap (0.04 sec)

  1. tests/query_test.go

    	} else {
    		for idx, user := range users {
    			t.Run("FindAll#"+strconv.Itoa(idx+1), func(t *testing.T) {
    				CheckUser(t, all[idx], user)
    			})
    		}
    	}
    
    	t.Run("FirstMap", func(t *testing.T) {
    		first := map[string]interface{}{}
    		if err := DB.Model(&User{}).Where("name = ?", "find").First(first).Error; err != nil {
    			t.Errorf("errors happened when query first: %v", err)
    		} else {
    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