2010-09-29 12:18:46 +08:00
|
|
|
var EventEmitter = require('events').EventEmitter;
|
2010-11-15 13:04:41 +08:00
|
|
|
var Client = require(__dirname+'/client');
|
2010-12-11 07:32:34 +08:00
|
|
|
var defaults = require(__dirname + '/defaults');
|
2011-03-04 02:21:43 +08:00
|
|
|
var pool = require(__dirname + "/client-pool").init(Client);
|
2011-03-12 02:29:27 +08:00
|
|
|
|
2010-09-29 12:18:46 +08:00
|
|
|
module.exports = {
|
2010-11-15 14:10:21 +08:00
|
|
|
Client: Client,
|
2010-11-15 13:04:41 +08:00
|
|
|
Connection: require(__dirname + '/connection'),
|
2011-03-04 02:21:43 +08:00
|
|
|
connect: pool.connect,
|
|
|
|
end: pool.end,
|
2011-03-16 12:00:58 +08:00
|
|
|
defaults: defaults
|
2010-11-15 14:10:21 +08:00
|
|
|
}
|
2011-03-16 12:00:58 +08:00
|
|
|
|
2011-05-02 13:32:30 +08:00
|
|
|
//lazy require native module...the c++ may not have been compiled
|
2011-03-16 12:00:58 +08:00
|
|
|
module.exports.__defineGetter__("native", function() {
|
2011-03-16 12:08:37 +08:00
|
|
|
return require(__dirname + '/native');
|
2011-03-16 12:00:58 +08:00
|
|
|
})
|