Skip to content

Commit

Permalink
export createPoolCluster
Browse files Browse the repository at this point in the history
  • Loading branch information
sidorares committed Aug 23, 2013
1 parent 339bca8 commit ae14be4
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
var Connection = require('./lib/connection');
var ConnectionConfig = require('./lib/connection_config');

module.exports.createConnection = function(opts) {
return new Connection({config: new ConnectionConfig(opts)});
//return new Connection(opts);
};

module.exports.connect = module.exports.createConnection;

module.exports.Connection = Connection;
module.exports.Types = require('./lib/constants/types');

var PoolConfig = require('./lib/pool_config');
var Pool = require('./lib/pool');
module.exports.createPool = function(config) {
return new Pool({config: new PoolConfig(config)});
var PoolConfig = require('./lib/pool_config');
var Pool = require('./lib/pool');
return new Pool({config: new PoolConfig(config)});
};

exports.createPoolCluster = function(config) {
var PoolConfig = require('./lib/pool_config');
var PoolCluster = require('./lib/pool_cluster');
return new PoolCluster(config);
};

var Server = require('./lib/server');
module.exports.createServer = function() {
var Server = require('./lib/server');
return new Server();
};

0 comments on commit ae14be4

Please sign in to comment.