Attach Query constructors to Client constructors
This commit is contained in:
parent
5d25bcdcf0
commit
903e9b25ea
@ -218,4 +218,7 @@ Client.md5 = function(string) {
|
||||
return crypto.createHash('md5').update(string).digest('hex');
|
||||
};
|
||||
|
||||
// expose a Query constructor
|
||||
Client.Query = Query;
|
||||
|
||||
module.exports = Client;
|
||||
|
@ -13,7 +13,7 @@ var PG = function(clientConstructor) {
|
||||
EventEmitter.call(this);
|
||||
this.Client = clientConstructor;
|
||||
this.Connection = require(__dirname + '/connection');
|
||||
this.Query = require(__dirname + '/query');
|
||||
this.Query = clientConstructor.Query
|
||||
this.defaults = defaults;
|
||||
};
|
||||
|
||||
|
@ -171,4 +171,7 @@ var clientBuilder = function(config) {
|
||||
return connection;
|
||||
};
|
||||
|
||||
// expose a Query constructor
|
||||
clientBuilder.Query = NativeQuery;
|
||||
|
||||
module.exports = clientBuilder;
|
||||
|
Loading…
Reference in New Issue
Block a user