Skip to content
Permalink
Browse files

add support for empty query in transactions

  • Loading branch information...
jeremydaly committed Jul 17, 2019
1 parent 6fa6fb8 commit c733279b526e28b6473892f8b173027708556728
Showing with 2 additions and 0 deletions.
  1. +2 −0 index.js
@@ -183,6 +183,8 @@ module.exports = (params) => {
// Run the query
return new PromiseLibrary((resolve,reject) => {
if (client !== null) {
// If no args are passed in a transaction, ignore query
if (this && this.rollback && args.length === 0) { return resolve([]) }
client.query(...args, async (err, results) => {
if (err && err.code === 'PROTOCOL_SEQUENCE_TIMEOUT') {
client.destroy() // destroy connection on timeout

0 comments on commit c733279

Please sign in to comment.
You can’t perform that action at this time.