File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ var PG = function(clientConstructor) {
1212 this . Query = this . Client . Query ;
1313 this . pools = pool ;
1414 this . Connection = Connection ;
15+ this . types = require ( 'pg-types' ) ;
1516} ;
1617
1718util . inherits ( PG , EventEmitter ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,14 @@ require(__dirname + '/test-helper');
22var utils = require ( __dirname + "/../../lib/utils" ) ;
33var defaults = require ( __dirname + "/../../lib" ) . defaults ;
44
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+ } )
12+
513//this tests the monkey patching
614//to ensure comptability with older
715//versions of node
You can’t perform that action at this time.
0 commit comments