We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 876abe8 commit 0254fa5Copy full SHA for 0254fa5
lib/index.js
@@ -12,6 +12,7 @@ var PG = function(clientConstructor) {
12
this.Query = this.Client.Query;
13
this.pools = pool;
14
this.Connection = Connection;
15
+ this.types = require('pg-types');
16
};
17
18
util.inherits(PG, EventEmitter);
test/unit/utils-tests.js
@@ -2,6 +2,14 @@ require(__dirname + '/test-helper');
2
var utils = require(__dirname + "/../../lib/utils");
3
var defaults = require(__dirname + "/../../lib").defaults;
4
5
+
6
+test('ensure types is exported on root object', function() {
7
+ var pg = require('../../lib')
8
+ assert(pg.types)
9
+ assert(pg.types.getTypeParser)
10
+ assert(pg.types.setTypeParser)
11
+})
//this tests the monkey patching
//to ensure comptability with older
//versions of node
0 commit comments