src/Db/Db.js
/**
	 * Create a new QuickDb instance or return the last used one.
	 * Specify connection details for MySQL and optionally SSH
	 * @param {Object} [config]  MySQL connection details such as host, login, password, encoding, database
	 * @see https://github.com/mysqljs/mysql#connection-options
	 * @param {Object} [sshConfig]  SSH connection details including host, port, user, privateKey
	 * @see https://github.com/mscdex/ssh2#client-methods
	 * @return {Db}
	 */
Create a new QuickDb instance or return the last used one.
Create a new QuickDb instance or return the last used one .
static factory(config = {}, sshConfig = null) {
		if (Db.instances.length === 0) {
			return new Db(config, sshConfig);
		}
		return Db.instances[Db.instances.length - 1];
	}
static factory ( config = { } , sshConfig = null ) { if ( Db . instances . length === 0 ) { return new Db ( config , sshConfig ) ; } return Db . instances [ Db . instances . length - 1 ] ; }
Create a new QuickDb instance or return the last used one.
Create a new QuickDb instance or return the last used one .