Methods
-
<inner> init( db, table, agencyOptions, callback )
-
Description
Initialize the Table in the database. This will drop an existing table, create a new one (along with any specified indices and/or foreign key relationships) and import the data from the table's source file.
Parameters
Name Type Description dbobject SQLite Database being built
tableRTTableSchema The Right Track Table Schema
agencyOptionsAgencyOptions The Agency Build Options
callbackbuildTableCallback Callback function called when init is finished
Details
-
<inner> create( db, table, callback )
-
Description
Create the table in the database, along with indices and foreign keys
Parameters
Name Type Description dbobject SQLite Database being built
tableRTTableSchema The Right Track Table Schema
callbackbuildTableCallback Callback function called when create is finished
Details
-
<inner> load( db, table, agencyOptions, callback )
-
Description
Load the source file into the database
Parameters
Name Type Description dbobject SQLite database being built
tableRTTableSchema The Right Track Table Schema
agencyOptionsAgencyOptions Agency Build Options
callbackbuildTableCallback Callback function called when load is finished
Details
-
<inner> add( db, table, values, callback )
-
Description
Add the specified values into the table
Parameters
Name Type Description dbobject SQLite database being built
tableRTTableSchema The Right Track Table Schema
valuesArray.<object> List of data to add to table. Each object is a set of data keypairs where the property name is the column header name and the value is the data value to add. Property names must match field names as specified in the
RTTableSchema.callbackbuildTableCallback Callback function called when the data has been added
Details