Build an ordered list of stops from multiple trips
Clear all realtime data from the database
Close the database connection.
When the library itself created the DB handle (via fromZip,
fromZipData, fromDatabase, or when attach() was called with
ownsDatabase: true), this also closes the underlying adapter. For
handles passed to attach() without ownsDatabase, this is a no-op
beyond clearing the internal reference — the caller owns the handle.
Export database to ArrayBuffer
Throws ExportNotSupportedError if the active adapter is file-backed
and cannot serialize the database to bytes.
Fetch and load GTFS Realtime data from configured feed URLs or provided URLs
Optionalurls: string[]Get active service IDs for a given date (YYYYMMDD format)
Get agencies with optional filters Pass agencyId filter to get a specific agency
Optionalfilters: AgencyFiltersGet calendar date exceptions for a service
Get calendar date exceptions for a specific date
Get direct access to the underlying adapter database handle (for advanced queries).
Get timestamp of the last successful realtime data fetch and insertion
Get currently configured GTFS-RT feed URLs
Get routes with optional filters Pass routeId filter to get a specific route
Optionalfilters: RouteFiltersGet shapes as GeoJSON FeatureCollection
Optionalfilters: ShapeFiltersGet current staleness threshold
Get stops with optional filters Pass stopId filter to get a specific stop
Optionalfilters: StopFiltersGet stop times with optional filters
Optionalfilters: StopTimeFilters & { date?: string }Get stop time updates with optional filters
Optionalfilters: StopTimeUpdateFiltersGet trips with optional filters Pass tripId filter to get a specific trip
Optionalfilters: TripFilters & { date?: string }Get trip updates with optional filters
Optionalfilters: TripUpdateFiltersGet vehicle positions with optional filters
Optionalfilters: VehiclePositionFiltersLoad GTFS Realtime data from pre-loaded protobuf buffers
Set GTFS-RT feed URLs
Set staleness threshold in seconds
StaticattachAttach to a pre-opened database handle.
Use this path when the caller already owns a live GtfsDatabase
(typical for file-backed native drivers: op-sqlite, expo-sqlite,
better-sqlite3). No adapter factory is needed — the handle is the
adapter output.
StaticcleanStaticclearStaticfromCreate GtfsSqlJs instance from existing SQLite database
StaticfromCreate GtfsSqlJs instance from GTFS ZIP file path or URL
StaticfromCreate GtfsSqlJs instance from pre-loaded GTFS ZIP data
Optionalsource: stringOptional original path/URL, used for cache key generation and metadata
StaticgetStaticlist
Build a directed stop-to-stop graph for the given trips.
Edges connect consecutive stops in a trip (paired via
stop_sequence, whose values need not be contiguous). Each edge carries the list of trips traversing it, with route_id and direction_id attached.