Example #1
0
func scanJob(r grabber.RowOrRows) (*scannedJob, error) {
	var job scannedJob
	if err := r.Scan(&job.JobID, &job.Filename, &job.ContestID, &job.ContestName, &job.TeamID, &job.SchoolName,
		&job.TeamNum, &job.ComputerID, &job.ComputerName, &job.AreaID, &job.AreaName, &job.Printer,
		&job.Data, &job.Arrived); err != nil {
		return nil, err
	}
	return &job, nil
}
Example #2
0
func scanSubmit(r grabber.RowOrRows) (result *scannedSubmit, err error) {
	var sub scannedSubmit
	if err = r.Scan(&sub.Contest, &sub.Team, &sub.Touched, &sub.Task, &sub.Compiled, &sub.Arrived, &sub.Passed,
		&sub.Taken, &sub.ID, &sub.Printer, &sub.SchoolMode, &sub.TestingID, &sub.SchoolName, &sub.TeamNum,
		&sub.ContestName, &sub.ProblemName, &sub.ComputerID, &sub.ComputerName, &sub.AreaID, &sub.AreaName); err == nil {
		result = &sub
	}
	return
}