minor changes
This commit is contained in:
parent
95bef54eed
commit
0593f14408
3 changed files with 29 additions and 44 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue