forked from sidorares/node-mysql2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}; |