func (s *Survey) FromRows(rows *sql.Rows) error {
	var scans struct {
		ID                  int
		CreateTime          sql.NullTime
		UpdateTime          sql.NullTime
		Name                sql.NullString
		OwnerName           sql.NullString
		CompletionTimestamp sql.NullTime
	}
	// the order here should be the same as in the `survey.Columns`.
	if err := rows.Scan(
		&scans.ID,
		&scans.CreateTime,
		&scans.UpdateTime,
		&scans.Name,
		&scans.OwnerName,
		&scans.CompletionTimestamp,
	); err != nil {
		return err
	}
	s.ID = strconv.Itoa(scans.ID)
	s.CreateTime = scans.CreateTime.Time
	s.UpdateTime = scans.UpdateTime.Time
	s.Name = scans.Name.String
	s.OwnerName = scans.OwnerName.String
	s.CompletionTimestamp = scans.CompletionTimestamp.Time
	return nil
}
// FromRows scans the sql response data into Survey.
FromRows scans the sql response data into Survey.
// FromRows scans the sql response data into Survey .
func (s *Survey) FromRows(rows *sql.Rows) error {
	var scans struct {
		ID                  int
		CreateTime          sql.NullTime
		UpdateTime          sql.NullTime
		Name                sql.NullString
		OwnerName           sql.NullString
		CompletionTimestamp sql.NullTime
	}
	if err := rows.Scan(
		&scans.ID,
		&scans.CreateTime,
		&scans.UpdateTime,
		&scans.Name,
		&scans.OwnerName,
		&scans.CompletionTimestamp,
	); err != nil {
		return err
	}
	s.ID = strconv.Itoa(scans.ID)
	s.CreateTime = scans.CreateTime.Time
	s.UpdateTime = scans.UpdateTime.Time
	s.Name = scans.Name.String
	s.OwnerName = scans.OwnerName.String
	s.CompletionTimestamp = scans.CompletionTimestamp.Time
	return nil
}
func ( s * Survey ) FromRows ( rows * sql . Rows ) error { var scans struct { ID int CreateTime sql . NullTime UpdateTime sql . NullTime Name sql . NullString OwnerName sql . NullString CompletionTimestamp sql . NullTime } if err := rows . Scan ( & scans . ID , & scans . CreateTime , & scans . UpdateTime , & scans . Name , & scans . OwnerName , & scans . CompletionTimestamp , ) ; err != nil { return err } s . ID = strconv . Itoa ( scans . ID ) s . CreateTime = scans . CreateTime . Time s . UpdateTime = scans . UpdateTime . Time s . Name = scans . Name . String s . OwnerName = scans . OwnerName . String s . CompletionTimestamp = scans . CompletionTimestamp . Time return nil }
FromRows scans the sql response data into Survey.
FromRows scans the sql response data into Survey .
// the order here should be the same as in the `survey.Columns`.