Order rows in the data tables

This commit is contained in:
Eli Ribble 2025-11-19 22:36:19 +00:00
parent 216c91ed10
commit 6dca03fd0a
No known key found for this signature in database

View file

@ -654,6 +654,8 @@ func inspectionsByCell(ctx context.Context, org *models.Organization, c h3.Cell)
sm.Where(
psql.F("ST_Within", "geom", geom_query),
),
sm.OrderBy("pointlocid"),
sm.OrderBy("enddatetime"),
).All(ctx, PGInstance.BobDB)
if err != nil {
return results, fmt.Errorf("Failed to query rows: %w", err)
@ -681,6 +683,7 @@ func breedingSourcesByCell(ctx context.Context, org *models.Organization, c h3.C
sm.Where(
psql.F("ST_Within", "geom", geom_query),
),
sm.OrderBy("lasttreatdate"),
).All(ctx, PGInstance.BobDB)
if err != nil {
return results, fmt.Errorf("Failed to query rows: %w", err)