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 db
object SQLite Database being built
table
RTTableSchema The Right Track Table Schema
agencyOptions
AgencyOptions The Agency Build Options
callback
buildTableCallback 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 db
object SQLite Database being built
table
RTTableSchema The Right Track Table Schema
callback
buildTableCallback 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 db
object SQLite database being built
table
RTTableSchema The Right Track Table Schema
agencyOptions
AgencyOptions Agency Build Options
callback
buildTableCallback 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 db
object SQLite database being built
table
RTTableSchema The Right Track Table Schema
values
Array.<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
.callback
buildTableCallback Callback function called when the data has been added
Details