Make pg-cursor compatible with older versions of pg (#3440)

Co-authored-by: Brian Carlson <brian.carlson@getcruise.com>
This commit is contained in:
Brian C 2025-04-24 15:12:48 -05:00 committed by GitHub
parent 0c1629bea2
commit 39e134d0b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,7 @@
'use strict'
const pg = require('pg')
const { Result, utils } = pg
const prepare = utils.prepareValue
// note: can remove these deep requires when we bump min version of pg to 9.x
const Result = require('pg/lib/result.js')
const prepare = require('pg/lib/utils.js').prepareValue
const EventEmitter = require('events').EventEmitter
const util = require('util')