func (pt *PropertyType) FromRows(rows *sql.Rows) error {
	var scanpt struct {
		ID                 int
		CreateTime         sql.NullTime
		UpdateTime         sql.NullTime
		Type               sql.NullString
		Name               sql.NullString
		Index              sql.NullInt64
		Category           sql.NullString
		IntVal             sql.NullInt64
		BoolVal            sql.NullBool
		FloatVal           sql.NullFloat64
		LatitudeVal        sql.NullFloat64
		LongitudeVal       sql.NullFloat64
		StringVal          sql.NullString
		RangeFromVal       sql.NullFloat64
		RangeToVal         sql.NullFloat64
		IsInstanceProperty sql.NullBool
		Editable           sql.NullBool
	}
	// the order here should be the same as in the `propertytype.Columns`.
	if err := rows.Scan(
		&scanpt.ID,
		&scanpt.CreateTime,
		&scanpt.UpdateTime,
		&scanpt.Type,
		&scanpt.Name,
		&scanpt.Index,
		&scanpt.Category,
		&scanpt.IntVal,
		&scanpt.BoolVal,
		&scanpt.FloatVal,
		&scanpt.LatitudeVal,
		&scanpt.LongitudeVal,
		&scanpt.StringVal,
		&scanpt.RangeFromVal,
		&scanpt.RangeToVal,
		&scanpt.IsInstanceProperty,
		&scanpt.Editable,
	); err != nil {
		return err
	}
	pt.ID = strconv.Itoa(scanpt.ID)
	pt.CreateTime = scanpt.CreateTime.Time
	pt.UpdateTime = scanpt.UpdateTime.Time
	pt.Type = scanpt.Type.String
	pt.Name = scanpt.Name.String
	pt.Index = int(scanpt.Index.Int64)
	pt.Category = scanpt.Category.String
	pt.IntVal = int(scanpt.IntVal.Int64)
	pt.BoolVal = scanpt.BoolVal.Bool
	pt.FloatVal = scanpt.FloatVal.Float64
	pt.LatitudeVal = scanpt.LatitudeVal.Float64
	pt.LongitudeVal = scanpt.LongitudeVal.Float64
	pt.StringVal = scanpt.StringVal.String
	pt.RangeFromVal = scanpt.RangeFromVal.Float64
	pt.RangeToVal = scanpt.RangeToVal.Float64
	pt.IsInstanceProperty = scanpt.IsInstanceProperty.Bool
	pt.Editable = scanpt.Editable.Bool
	return nil
}
// FromRows scans the sql response data into PropertyType.
FromRows scans the sql response data into PropertyType.
// FromRows scans the sql response data into PropertyType .
func (pt *PropertyType) FromRows(rows *sql.Rows) error {
	var scanpt struct {
		ID                 int
		CreateTime         sql.NullTime
		UpdateTime         sql.NullTime
		Type               sql.NullString
		Name               sql.NullString
		Index              sql.NullInt64
		Category           sql.NullString
		IntVal             sql.NullInt64
		BoolVal            sql.NullBool
		FloatVal           sql.NullFloat64
		LatitudeVal        sql.NullFloat64
		LongitudeVal       sql.NullFloat64
		StringVal          sql.NullString
		RangeFromVal       sql.NullFloat64
		RangeToVal         sql.NullFloat64
		IsInstanceProperty sql.NullBool
		Editable           sql.NullBool
	}
	if err := rows.Scan(
		&scanpt.ID,
		&scanpt.CreateTime,
		&scanpt.UpdateTime,
		&scanpt.Type,
		&scanpt.Name,
		&scanpt.Index,
		&scanpt.Category,
		&scanpt.IntVal,
		&scanpt.BoolVal,
		&scanpt.FloatVal,
		&scanpt.LatitudeVal,
		&scanpt.LongitudeVal,
		&scanpt.StringVal,
		&scanpt.RangeFromVal,
		&scanpt.RangeToVal,
		&scanpt.IsInstanceProperty,
		&scanpt.Editable,
	); err != nil {
		return err
	}
	pt.ID = strconv.Itoa(scanpt.ID)
	pt.CreateTime = scanpt.CreateTime.Time
	pt.UpdateTime = scanpt.UpdateTime.Time
	pt.Type = scanpt.Type.String
	pt.Name = scanpt.Name.String
	pt.Index = int(scanpt.Index.Int64)
	pt.Category = scanpt.Category.String
	pt.IntVal = int(scanpt.IntVal.Int64)
	pt.BoolVal = scanpt.BoolVal.Bool
	pt.FloatVal = scanpt.FloatVal.Float64
	pt.LatitudeVal = scanpt.LatitudeVal.Float64
	pt.LongitudeVal = scanpt.LongitudeVal.Float64
	pt.StringVal = scanpt.StringVal.String
	pt.RangeFromVal = scanpt.RangeFromVal.Float64
	pt.RangeToVal = scanpt.RangeToVal.Float64
	pt.IsInstanceProperty = scanpt.IsInstanceProperty.Bool
	pt.Editable = scanpt.Editable.Bool
	return nil
}
func ( pt * PropertyType ) FromRows ( rows * sql . Rows ) error { var scanpt struct { ID int CreateTime sql . NullTime UpdateTime sql . NullTime Type sql . NullString Name sql . NullString Index sql . NullInt64 Category sql . NullString IntVal sql . NullInt64 BoolVal sql . NullBool FloatVal sql . NullFloat64 LatitudeVal sql . NullFloat64 LongitudeVal sql . NullFloat64 StringVal sql . NullString RangeFromVal sql . NullFloat64 RangeToVal sql . NullFloat64 IsInstanceProperty sql . NullBool Editable sql . NullBool } if err := rows . Scan ( & scanpt . ID , & scanpt . CreateTime , & scanpt . UpdateTime , & scanpt . Type , & scanpt . Name , & scanpt . Index , & scanpt . Category , & scanpt . IntVal , & scanpt . BoolVal , & scanpt . FloatVal , & scanpt . LatitudeVal , & scanpt . LongitudeVal , & scanpt . StringVal , & scanpt . RangeFromVal , & scanpt . RangeToVal , & scanpt . IsInstanceProperty , & scanpt . Editable , ) ; err != nil { return err } pt . ID = strconv . Itoa ( scanpt . ID ) pt . CreateTime = scanpt . CreateTime . Time pt . UpdateTime = scanpt . UpdateTime . Time pt . Type = scanpt . Type . String pt . Name = scanpt . Name . String pt . Index = int ( scanpt . Index . Int64 ) pt . Category = scanpt . Category . String pt . IntVal = int ( scanpt . IntVal . Int64 ) pt . BoolVal = scanpt . BoolVal . Bool pt . FloatVal = scanpt . FloatVal . Float64 pt . LatitudeVal = scanpt . LatitudeVal . Float64 pt . LongitudeVal = scanpt . LongitudeVal . Float64 pt . StringVal = scanpt . StringVal . String pt . RangeFromVal = scanpt . RangeFromVal . Float64 pt . RangeToVal = scanpt . RangeToVal . Float64 pt . IsInstanceProperty = scanpt . IsInstanceProperty . Bool pt . Editable = scanpt . Editable . Bool return nil }
FromRows scans the sql response data into PropertyType.
FromRows scans the sql response data into PropertyType .
// the order here should be the same as in the `propertytype.Columns`.