index.js 696 B

123456789101112131415161718192021
  1. var Connection = require('./lib/Connection');
  2. var ConnectionConfig = require('./lib/ConnectionConfig');
  3. var Types = require('./lib/protocol/constants/types');
  4. var SqlString = require('./lib/protocol/SqlString');
  5. var Pool = require('./lib/Pool');
  6. var PoolConfig = require('./lib/PoolConfig');
  7. exports.createConnection = function(config) {
  8. return new Connection({config: new ConnectionConfig(config)});
  9. };
  10. exports.createPool = function(config) {
  11. return new Pool({config: new PoolConfig(config)});
  12. };
  13. exports.createQuery = Connection.createQuery;
  14. exports.Types = Types;
  15. exports.escape = SqlString.escape;
  16. exports.escapeId = SqlString.escapeId;