Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Attach Query constructors to Client constructors

  • Loading branch information...
commit 903e9b25ea76354fc7fc41f54d44cd0124f796d4 1 parent 5d25bcd
@grncdr grncdr authored committed
Showing with 7 additions and 1 deletion.
  1. +3 −0  lib/client.js
  2. +1 −1  lib/index.js
  3. +3 −0  lib/native/index.js
View
3  lib/client.js
@@ -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;
View
2  lib/index.js
@@ -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;
};
View
3  lib/native/index.js
@@ -171,4 +171,7 @@ var clientBuilder = function(config) {
return connection;
};
+// expose a Query constructor
+clientBuilder.Query = NativeQuery;
+
module.exports = clientBuilder;
Please sign in to comment.
Something went wrong with that request. Please try again.