Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ScanRowsUser1 (0.06 sec)

  1. tests/scan_test.go

    	} 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)
Back to top