Description

Service and ServiceException Query Functions

These functions query the gtfs_calendar and gtfs_calendar_dates tables in the Right Track Database.

Methods


<inner> getService( db, id, callback )

Description

Get the Service(s) specified by Service ID(s) from the passed database. The Service will also include any included Service Exceptions for the Service.

Parameters
Name Type Description
db RightTrackDB

The Right Track Database to query

id String | Array.<String>

Service ID or list of Service IDs

callback function

Callback function

Name Type Description
error Error

Database Query Error

service Service | Array.<Service>

The selected Service(s)


<inner> getServicesEffective( db, date, callback )

Description

Get the Services in effect on the specified date. This includes any exceptions found in the calendar_dates file.

Parameters
Name Type Description
db RightTrackDB

The Right Track Database to query

date int

The date to query (yyyymmdd)

callback function

Callback function

Name Type Description
error Error

Database Query Error

services Array.<Service>

The selected Services


<inner> getServicesDefault( db, date, callback )

Description

Get the default Services in effect on the specified date. These services don't include any changes due to service exceptions.

Parameters
Name Type Description
db RightTrackDB

The Right Track Database to query

date int

The date to query (yyyymmdd)

callback function

Callback function

Name Type Description
error Error

Database Query Error

services Array.<Service>

The selected Services


<inner> getServiceExceptions( db, date, callback )

Description

Get the Service Exceptions in effect on the specified date. This includes Services that are either added or removed on the specified date.

Parameters
Name Type Description
db RightTrackDB

The Right Track Database to query

date int

The date to query (yyyymmdd)

callback function

Callback function

Name Type Description
error Error

Database Query Error

services Array.<ServiceException>

The selected Service Exceptions