func (fps *FloorPlanScale) FromRows(rows *sql.Rows) error {
	var scanfps struct {
		ID               int
		CreateTime       sql.NullTime
		UpdateTime       sql.NullTime
		ReferencePoint1X sql.NullInt64
		ReferencePoint1Y sql.NullInt64
		ReferencePoint2X sql.NullInt64
		ReferencePoint2Y sql.NullInt64
		ScaleInMeters    sql.NullFloat64
	}
	// the order here should be the same as in the `floorplanscale.Columns`.
	if err := rows.Scan(
		&scanfps.ID,
		&scanfps.CreateTime,
		&scanfps.UpdateTime,
		&scanfps.ReferencePoint1X,
		&scanfps.ReferencePoint1Y,
		&scanfps.ReferencePoint2X,
		&scanfps.ReferencePoint2Y,
		&scanfps.ScaleInMeters,
	); err != nil {
		return err
	}
	fps.ID = strconv.Itoa(scanfps.ID)
	fps.CreateTime = scanfps.CreateTime.Time
	fps.UpdateTime = scanfps.UpdateTime.Time
	fps.ReferencePoint1X = int(scanfps.ReferencePoint1X.Int64)
	fps.ReferencePoint1Y = int(scanfps.ReferencePoint1Y.Int64)
	fps.ReferencePoint2X = int(scanfps.ReferencePoint2X.Int64)
	fps.ReferencePoint2Y = int(scanfps.ReferencePoint2Y.Int64)
	fps.ScaleInMeters = scanfps.ScaleInMeters.Float64
	return nil
}
// FromRows scans the sql response data into FloorPlanScale.
FromRows scans the sql response data into FloorPlanScale.
// FromRows scans the sql response data into FloorPlanScale .
func (fps *FloorPlanScale) FromRows(rows *sql.Rows) error {
	var scanfps struct {
		ID               int
		CreateTime       sql.NullTime
		UpdateTime       sql.NullTime
		ReferencePoint1X sql.NullInt64
		ReferencePoint1Y sql.NullInt64
		ReferencePoint2X sql.NullInt64
		ReferencePoint2Y sql.NullInt64
		ScaleInMeters    sql.NullFloat64
	}
	if err := rows.Scan(
		&scanfps.ID,
		&scanfps.CreateTime,
		&scanfps.UpdateTime,
		&scanfps.ReferencePoint1X,
		&scanfps.ReferencePoint1Y,
		&scanfps.ReferencePoint2X,
		&scanfps.ReferencePoint2Y,
		&scanfps.ScaleInMeters,
	); err != nil {
		return err
	}
	fps.ID = strconv.Itoa(scanfps.ID)
	fps.CreateTime = scanfps.CreateTime.Time
	fps.UpdateTime = scanfps.UpdateTime.Time
	fps.ReferencePoint1X = int(scanfps.ReferencePoint1X.Int64)
	fps.ReferencePoint1Y = int(scanfps.ReferencePoint1Y.Int64)
	fps.ReferencePoint2X = int(scanfps.ReferencePoint2X.Int64)
	fps.ReferencePoint2Y = int(scanfps.ReferencePoint2Y.Int64)
	fps.ScaleInMeters = scanfps.ScaleInMeters.Float64
	return nil
}
func ( fps * FloorPlanScale ) FromRows ( rows * sql . Rows ) error { var scanfps struct { ID int CreateTime sql . NullTime UpdateTime sql . NullTime ReferencePoint1X sql . NullInt64 ReferencePoint1Y sql . NullInt64 ReferencePoint2X sql . NullInt64 ReferencePoint2Y sql . NullInt64 ScaleInMeters sql . NullFloat64 } if err := rows . Scan ( & scanfps . ID , & scanfps . CreateTime , & scanfps . UpdateTime , & scanfps . ReferencePoint1X , & scanfps . ReferencePoint1Y , & scanfps . ReferencePoint2X , & scanfps . ReferencePoint2Y , & scanfps . ScaleInMeters , ) ; err != nil { return err } fps . ID = strconv . Itoa ( scanfps . ID ) fps . CreateTime = scanfps . CreateTime . Time fps . UpdateTime = scanfps . UpdateTime . Time fps . ReferencePoint1X = int ( scanfps . ReferencePoint1X . Int64 ) fps . ReferencePoint1Y = int ( scanfps . ReferencePoint1Y . Int64 ) fps . ReferencePoint2X = int ( scanfps . ReferencePoint2X . Int64 ) fps . ReferencePoint2Y = int ( scanfps . ReferencePoint2Y . Int64 ) fps . ScaleInMeters = scanfps . ScaleInMeters . Float64 return nil }
FromRows scans the sql response data into FloorPlanScale.
FromRows scans the sql response data into FloorPlanScale .
// the order here should be the same as in the `floorplanscale.Columns`.