resolve(name) {
        // to prevent mutability
        let config = {...this.config['connections'][name]};

        if (!config) throw new Error('connection configuration for', name, 'was not specified');

        let driver = (this.customDrivers.hasOwnProperty(config.driver))
            ? this.customDrivers[config.driver](config)
            // if no custom connection specified search for the default connections
            : this.defaultDrivers[config.driver](config);

        if (!(driver instanceof ConnectionContract))
            throw new Error('specified driver must implement ConnectionContract')

        return driver;
    }
/**
     * Identify and Initialize the right driver to be used.
     * @param {string} name - name of the connection to be used.
     * @return {object} instance of driver to be used.
     */
Identify and Initialize the right driver to be used.
@param {string} name - name of the connection to be used.
@return {object} instance of driver to be used.
Identify and Initialize the right driver to be used . @param { string } name - name of the connection to be used . @return { object } instance of driver to be used .
resolve(name) {
        let config = {...this.config['connections'][name]};
        if (!config) throw new Error('connection configuration for', name, 'was not specified');
        let driver = (this.customDrivers.hasOwnProperty(config.driver))
            ? this.customDrivers[config.driver](config)
            : this.defaultDrivers[config.driver](config);
        if (!(driver instanceof ConnectionContract))
            throw new Error('specified driver must implement ConnectionContract')
        return driver;
    }
resolve ( name ) { let config = { ... this . config [ 'connections' ] [ name ] } ; if ( ! config ) throw new Error ( 'connection configuration for' , name , 'was not specified' ) ; let driver = ( this . customDrivers . hasOwnProperty ( config . driver ) ) ? this . customDrivers [ config . driver ] ( config ) : this . defaultDrivers [ config . driver ] ( config ) ; if ( ! ( driver instanceof ConnectionContract ) ) throw new Error ( 'specified driver must implement ConnectionContract' ) return driver ; }
Identify and Initialize the right driver to be used.
Identify and Initialize the right driver to be used .
// to prevent mutability // if no custom connection specified search for the default connections