lib/mysql/mysql/index.js
function loadClass(className) {
  var Class = Classes[className];

  if (Class !== undefined) {
    return Class;
  }

  // This uses a switch for static require analysis
  switch (className) {
    case 'Connection':
      Class = require('./lib/Connection');
      break;
    case 'ConnectionConfig':
      Class = require('./lib/ConnectionConfig');
      break;
    case 'Pool':
      Class = require('./lib/Pool');
      break;
    case 'PoolCluster':
      Class = require('./lib/PoolCluster');
      break;
    case 'PoolConfig':
      Class = require('./lib/PoolConfig');
      break;
    case 'SqlString':
      Class = require('./lib/protocol/SqlString');
      break;
    case 'Types':
      Class = require('./lib/protocol/constants/types');
      break;
    default:
      throw new Error('Cannot find class \'' + className + '\'');
  }

  // Store to prevent invoking require()
  Classes[className] = Class;

  return Class;
}
function loadClass(className) {
  var Class = Classes[className];

  if (Class !== undefined) {
    return Class;
  }

  // This uses a switch for static require analysis
  switch (className) {
    case 'Connection':
      Class = require('./lib/Connection');
      break;
    case 'ConnectionConfig':
      Class = require('./lib/ConnectionConfig');
      break;
    case 'Pool':
      Class = require('./lib/Pool');
      break;
    case 'PoolCluster':
      Class = require('./lib/PoolCluster');
      break;
    case 'PoolConfig':
      Class = require('./lib/PoolConfig');
      break;
    case 'SqlString':
      Class = require('./lib/protocol/SqlString');
      break;
    case 'Types':
      Class = require('./lib/protocol/constants/types');
      break;
    default:
      throw new Error('Cannot find class \'' + className + '\'');
  }

  // Store to prevent invoking require()
  Classes[className] = Class;

  return Class;
}
function loadClass ( className ) { var Class = Classes [ className ] ; if ( Class !== undefined ) { return Class ; } // This uses a switch for static require analysis switch ( className ) { case 'Connection' : Class = require ( './lib/Connection' ) ; break ; case 'ConnectionConfig' : Class = require ( './lib/ConnectionConfig' ) ; break ; case 'Pool' : Class = require ( './lib/Pool' ) ; break ; case 'PoolCluster' : Class = require ( './lib/PoolCluster' ) ; break ; case 'PoolConfig' : Class = require ( './lib/PoolConfig' ) ; break ; case 'SqlString' : Class = require ( './lib/protocol/SqlString' ) ; break ; case 'Types' : Class = require ( './lib/protocol/constants/types' ) ; break ; default : throw new Error ( 'Cannot find class \'' + className + '\'' ) ; } // Store to prevent invoking require() Classes [ className ] = Class ; return Class ; }
Load the given class.
@param {string} className Name of class to default
@return {function|object} Class constructor or exports
@private
Load the given class .