Chore: make db.taskEx private

This commit is contained in:
csrapr 2021-06-08 23:17:56 +01:00 committed by Josh Harvey
parent 081957c957
commit 64e07fa8bd
2 changed files with 10 additions and 10 deletions

View file

@ -9,13 +9,13 @@ const extendedQueries = require('./extendedQueries')
const pgp = Pgp({
pgNative: true,
extend (obj, dbContext) {
obj.taskEx = function () {
obj._taskEx = function () {
const args = pgp.utils.taskArgs(arguments)
const { schema } = args.options
delete args.options.schema
if (schema) {
return obj.task.call(this, args.options, t => {
return t.none('SET search_path to $1:name', [schema])
return t.none('SET search_path TO $1:name', [schema])
.then(args.cb.bind(t, t))
})
}