- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestScanRows (0.07 sec)
-
tests/scan_test.go
t.Fatalf("Failed to query with pointer of value, got error %v", err) } else if rus := resInt5.([]User); len(rus) != 3 { t.Fatalf("Scan into struct should work, got %+v, len %v", resInt5, len(rus)) } } func TestScanRows(t *testing.T) { user1 := User{Name: "ScanRowsUser1", Age: 1} user2 := User{Name: "ScanRowsUser2", Age: 10} user3 := User{Name: "ScanRowsUser3", Age: 20} DB.Save(&user1).Save(&user2).Save(&user3)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10.9K bytes - Viewed (0)