Merge pull request #47 from pistor/remove-pg.js-support

Remove support for deprecated pg.js package
This commit is contained in:
Brian C 2019-01-08 08:27:07 -06:00 committed by GitHub
commit 73506d36b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 12 deletions

View File

@ -1,6 +1,6 @@
'use strict'
const Result = require('./pg').Result
const prepare = require('./pg').prepareValue
const Result = require('pg/lib/result.js')
const prepare = require('pg/lib/utils.js').prepareValue
const EventEmitter = require('events').EventEmitter
const util = require('util')

10
pg.js
View File

@ -1,10 +0,0 @@
// support both pg & pg.js
// this will eventually go away when i break native bindings
// out into their own module
try {
module.exports.Result = require('pg/lib/result.js')
module.exports.prepareValue = require('pg/lib/utils.js').prepareValue
} catch (e) {
module.exports.Result = require('pg.js/lib/result.js')
module.exports.prepareValue = require('pg.js/lib/utils.js').prepareValue
}