Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including right-track-db-sqljs with all npm packages installed. Try it out:

var rightTrackDbSqljs = require("right-track-db-sqljs")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

right-track-db-sqljs v1.1.0

Right Track Database: sqljs

Right Track Database (sql.js)

node module: right-track-db-sqljs
GitHub repo: right-track/right-track-db-sqljs


This Node module provides an implementation of the abstract RightTrackDB Class using the sql.js module. This Class is used to query the SQLite Right Track Database containing the GTFS and additional Right Track data. The SQLite database is generated using the right-track-db-build module.

Documentation

This module does not directly require the sql.js module. However, the web-accessible path to the Web Worker version of sql.js must be provided to the Right Track Database import statement.

const RightTrackDB = require("right-track-db-sqljs")("/js/worker.sql.js");

When creating a new instance of a RightTrackDB, the Right Track Agency configuration and a Uint8Array representing the database data must be passed to the constructor.

let db = new RightTrackDB(agencyConfig, dataArray);

For documentation on this implementation of RightTrackDB, see the /doc/ directory in this repository or online at https://docs.righttrack.io/right-track-db-sqljs.

For documentation on the abstract RightTrackDB Class, see the source code available at https://github.com/right-track/right-track-db or its documentation at https://docs.righttrack.io/right-track-db.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free