load_props_for

Function load_props_for 

Source
pub async fn load_props_for(
    drawing: &Drawing,
    conn: &mut AsyncPgConnection,
) -> QueryResult<DrawingVariantEntity>
Expand description

Load properties for a specific drawing.

This inspects drawing.shape_type and loads the corresponding props row(s) from the correct props table.

For FreeLine and BezierPolygon, this additionally:

  • Loads the ordered list of all point rows
  • Returns an aggregated DrawingVariantEntity containing both props and points

ยงErrors

  • If the props row for the drawing does not exist
  • If point rows fail to load or violate ordering assumptions