diff --git a/select-builder-pgsql.js b/select-builder-pgsql.js index d64465d..4492ff5 100644 --- a/select-builder-pgsql.js +++ b/select-builder-pgsql.js @@ -1,6 +1,6 @@ // Простенький "селект билдер" по мотивам MediaWiki-овского, успешно юзаю подобный в PHP уже лет 8 -// (c) Виталий Филиппов, 2019-2021 -// Версия 2021-11-24 +// (c) Виталий Филиппов, 2019-2022 +// Версия 2022-01-19 // В PHP, правда, прикольнее - там в массиве можно смешивать строковые и численные ключи, // благодаря чему можно писать $where = [ 't1.a=t2.a', 't2.b' => [ 1, 2, 3 ] ] @@ -796,13 +796,14 @@ class Connection extends ConnectionBase this.in_transaction = null; const next = this.transaction_queue.shift(); if (next) - next(); + setImmediate(next); } async _query(sql, bind) { - if (this.in_transaction && this.connection_lost) + if (this.in_transaction && this.in_transaction !== true && this.connection_lost) { + this.connection_lost = false; this._next_txn(); throw new Error('Connection lost while in transaction'); }