finish/sanityChecks

Database Sanity Checks

This function performs a set list of sanity checks on the compiled agency database. If any of these checks fail, the function will add the error to the DB compilation exceptions and return false in the callback.

Source:

Members

(inner, constant) CHECKS :Array.<object>

Source:
Properties:
Name Type Description
name string

Check Name

select string

SQL Select statement to perform

test function

Function that accepts a single DB row and returns a boolean (pass/fail)

Properties
Name Type Description
row boolean

SQLite DB Row object returned from the SELECT query

List of sanity checks to perform on the agency database. Each object in this array contains three properties that define the sanity check.

Type:
  • Array.<object>

Methods

(inner) sanityChecks(db, agencyOptions, callback)

Source:

Run sanity checks on the specified agency's database

Parameters:
Name Type Description
db object

SQLite Database

agencyOptions object

Agency Options

callback function

Sanity check callback function

Properties
Name Type Description
sane boolean

Sanity Check pass flag