src/Db/Db.js
/**
	 * Make a new connection to MySQL
	 */
Make a new connection to MySQL
Make a new connection to MySQL
async connect() {
		if (this.ssh) {
			await this.ssh.tunnelTo(this);
		}
		this.connection = mysql.createConnection(this.config);
		return new Promise((resolve, reject) => {
			this.connection.connect(error => {
				if (error) {
					decorateError(error);
					reject(error);
				} else {
					resolve();
				}
			});
		});
	}
async connect ( ) { if ( this . ssh ) { await this . ssh . tunnelTo ( this ) ; } this . connection = mysql . createConnection ( this . config ) ; return new Promise ( ( resolve , reject ) => { this . connection . connect ( error => { if ( error ) { decorateError ( error ) ; reject ( error ) ; } else { resolve ( ) ; } } ) ; } ) ; }
Make a new connection to MySQL
Make a new connection to MySQL
/**
		 * The mysql2 library connection object
		 * @type {Object}
		 */