Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. tests/query_test.go

    		Table: clause.CurrentTable, Name: clause.PrimaryKey,
    	}, Value: 1}).Scan(&p2).Error
    	AssertEqual(t, err, gorm.ErrModelValueRequired)
    }
    
    func TestQueryScanToArray(t *testing.T) {
    	err := DB.Create(&User{Name: "testname1", Age: 10}).Error
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	users := [2]*User{{Name: "1"}, {Name: "2"}}
    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