chore: undo $ prepend on queries

This commit is contained in:
Taranto 2021-07-22 11:06:39 +01:00 committed by Josh Harvey
parent f3f2bb01b0
commit ba4117173e
50 changed files with 215 additions and 227 deletions

View file

@ -61,7 +61,7 @@ function upsert (t, dbTx, preProcessedTx) {
function insert (t, tx) {
const dbTx = massage(tx)
const sql = pgp.helpers.insert(dbTx, null, 'cash_in_txs') + ' returning *'
return t.$one(sql)
return t.one(sql)
.then(toObj)
}
@ -72,7 +72,7 @@ function update (t, tx, changes) {
const sql = pgp.helpers.update(dbChanges, null, 'cash_in_txs') +
pgp.as.format(' where id=$1', [tx.id]) + ' returning *'
return t.$one(sql)
return t.one(sql)
.then(toObj)
}