minor changes

This commit is contained in:
Nicholas Orlowsky 2025-09-23 18:03:28 -04:00
parent 95bef54eed
commit 0593f14408
No known key found for this signature in database
GPG key ID: A9F3BA4C0AA7A70B
3 changed files with 29 additions and 44 deletions

View file

@ -46,6 +46,12 @@ pub async fn get_all_routes(
route_type as "route_type: libseptastic::route::RouteType"
FROM
septa_routes
ORDER BY
CASE
WHEN id ~ '^[0-9]+$' THEN CAST(id AS INT)
ELSE NULL
END ASC,
id ASC;
;"#
)
.fetch_all(&mut **transaction)
@ -116,17 +122,11 @@ pub async fn get_schedule_by_route_id(
trip_id,
service_id,
septa_stop_schedules.direction_id,
septa_directions.direction as "direction: libseptastic::direction::CardinalDirection",
arrival_time,
stop_id,
stop_sequence
FROM
septa_stop_schedules
INNER JOIN septa_directions
ON
septa_directions.direction_id = septa_stop_schedules.direction_id
AND
septa_directions.route_id = septa_stop_schedules.route_id
INNER JOIN septa_stops
ON septa_stops.id = septa_stop_schedules.stop_id
WHERE