new DBConnector()
Handles connections to the database (MySQL and TODO Elasticsearch)
- Source:
Methods
escape()
Escape strings
- Source:
- See:
-
- node-mysql's escape function
getConnection() → {Promise}
Retrieve a connection from the pool
- Source:
Returns:
a promise that will resolve with a MySQL connnection
- Type
- Promise
initializeConnectionPool() → {Promise}
Initialize the connection pool using settings from config file
- Source:
Returns:
a promise that will resolve with the connection pool
- Type
- Promise
stop(msg)
Log an error message and stop the process
Parameters:
Name | Type | Description |
---|---|---|
msg |
String | error message |
- Source: