Chore: make db.taskEx private
This commit is contained in:
parent
081957c957
commit
64e07fa8bd
2 changed files with 10 additions and 10 deletions
|
|
@ -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))
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue