Skip to content

Claude/create gtfs sqljs module 011 c up nn k ltuvz d dz xyz fy rm - #7

Merged
chtitux merged 2 commits into
mainfrom
claude/create-gtfs-sqljs-module-011CUpNnKLtuvzDDzXYZFyRm
Nov 5, 2025
Merged

chtitux merged 2 commits into
mainfrom
claude/create-gtfs-sqljs-module-011CUpNnKLtuvzDDzXYZFyRm

Conversation

@chtitux

@chtitux chtitux commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

No description provided.

…, add file skipping

BREAKING CHANGES:
- Removed redundant convenience methods that can be replaced with flexible API
- Kept only: getById methods, flexible filter methods (get* with filters), and essential calendar methods

New Features:
- Add agency query methods (getAgencies, getAgencyById)
- Add agencyId filter to routes, trips, and stop times queries
- Add skipFiles option to fromZip to skip importing specific files (tables still created)
- Demo now skips shapes.txt import for faster loading
- Add SQLite database download button in demo

API Changes:
Removed methods (use flexible API instead):
- getAllStops() → getStops()
- searchStopsByName(name) → getStops({ name })
- getStopByCode(code) → getStops({ stopCode: code })[0]
- getAllRoutes() → getRoutes()
- getRoutesByAgency(id) → getRoutes({ agencyId: id })
- getTripsByRoute(id) → getTrips({ routeId: id })
- getTripsByRouteAndDate(id, date) → getTrips({ routeId: id, date })
- getTripsByRouteAndDateAndDirection() → getTrips({ routeId, date, directionId })
- getTripsByDate(date) → getTrips({ date })
- getStopsByTrip(id) → getStops({ tripId: id })
- getStopTimesByStop(id, limit) → getStopTimes({ stopId: id, limit })
- getStopTimesForStopRouteAndDate() → getStopTimes({ stopId, routeId, date, directionId })

Kept methods:
- getAgencyById, getAgencies (new)
- getStopById, getStops
- getRouteById, getRoutes
- getTripById, getTrips
- getStopTimesByTrip, getStopTimes
- All calendar methods (getActiveServiceIds, getCalendarByServiceId, etc.)

All 77 tests pass with updated API usage.
Documentation updates:
- Update all query examples to use new flexible filter-based API
- Add agency methods documentation (getAgencies, getAgencyById)
- Show skipFiles feature in examples
- Update "Complete Example" section with new API patterns
- Simplify API reference to reflect actual current methods
- Remove references to deprecated convenience methods

Demo improvements:
- Display trip_short_name prominently instead of trip_id
- Show trip_id as secondary information when short_name exists
- Sort trips by trip_short_name with numeric comparison
- Add new CSS styles for trip display hierarchy (.trip-name, .trip-id-secondary)

These changes improve documentation clarity and make the demo
more user-friendly by showing meaningful trip names.
@chtitux
chtitux merged commit f245f7c into main Nov 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants