What is the best way to provide 'pgp' to the following function?
Considering 'db' can be db connection, transaction (tx), or task from the above.
module.exports = async (db, tableName, records) => {
const record_ = records[0]
const columns_ = []
for (const c_ in record_) { columns_.push(c_) }
const insert_ = pgp.helpers.insert(records, columns_, tableName)
return db.result(insert_, null, r => r.rowCount)
}