static _createLoadBalancingStrategy(config, connectionPool) {
    const configuredValue = config.loadBalancingStrategy;
    if (!configuredValue || configuredValue === LEAST_CONNECTED_STRATEGY_NAME) {
      return new LeastConnectedLoadBalancingStrategy(connectionPool);
    } else if (configuredValue === ROUND_ROBIN_STRATEGY_NAME) {
      return new RoundRobinLoadBalancingStrategy();
    } else {
      throw newError('Unknown load balancing strategy: ' + configuredValue);
    }
  }
/**
   * Create new load balancing strategy based on the config.
   * @param {object} config the user provided config.
   * @param {Pool} connectionPool the connection pool for this driver.
   * @return {LoadBalancingStrategy} new strategy.
   * @private
   */
Create new load balancing strategy based on the config.
@param {object} config the user provided config.
@param {Pool} connectionPool the connection pool for this driver.
@return {LoadBalancingStrategy} new strategy.
@private
Create new load balancing strategy based on the config . @param { object } config the user provided config . @param { Pool } connectionPool the connection pool for this driver . @return { LoadBalancingStrategy } new strategy . @private
static _createLoadBalancingStrategy(config, connectionPool) {
    const configuredValue = config.loadBalancingStrategy;
    if (!configuredValue || configuredValue === LEAST_CONNECTED_STRATEGY_NAME) {
      return new LeastConnectedLoadBalancingStrategy(connectionPool);
    } else if (configuredValue === ROUND_ROBIN_STRATEGY_NAME) {
      return new RoundRobinLoadBalancingStrategy();
    } else {
      throw newError('Unknown load balancing strategy: ' + configuredValue);
    }
  }
static _createLoadBalancingStrategy ( config , connectionPool ) { const configuredValue = config . loadBalancingStrategy ; if ( ! configuredValue || configuredValue === LEAST_CONNECTED_STRATEGY_NAME ) { return new LeastConnectedLoadBalancingStrategy ( connectionPool ) ; } else if ( configuredValue === ROUND_ROBIN_STRATEGY_NAME ) { return new RoundRobinLoadBalancingStrategy ( ) ; } else { throw newError ( 'Unknown load balancing strategy: ' + configuredValue ) ; } }
Create new load balancing strategy based on the config.
Create new load balancing strategy based on the config .