pure-live-pg
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -58,3 +58,3 @@ 'use strict'; | ||
// if we have a transactionHandle, we does'nt get a new connection | ||
// istead we have to execute the statement on the given connection | ||
// instead we have to execute the statement on the given connection | ||
// from the transactionHandle | ||
@@ -95,5 +95,10 @@ if (transactionHandle) { | ||
(result, statementId, callback) => { | ||
//console.log('EXECUTED'); | ||
// waiting till clientId was received for the notify-listner and all reactive queries are performed | ||
if (clientId != PGTable.NO_CLIENT_ID_SUPPORTED && result.rowCount > 0) { | ||
// waiting till clientId was received for the notify-listner and all | ||
// reactive queries are performed for this client. | ||
// | ||
// If there was an active transaction we can't wait, because the pg_notify events | ||
// are transactional. By using transactions there is no chance for optimistic UI | ||
// As alternative all statements can issue within a storeProcedure that executes | ||
// all statements an manages the transaction at start and end of the procedure itself. | ||
if (!transactionHandle && clientId != PGTable.NO_CLIENT_ID_SUPPORTED && result.rowCount > 0) { | ||
var interv = setInterval(()=>{ | ||
@@ -117,5 +122,5 @@ if (!this._database._runningStatements[statementId]) { | ||
(error, results) => { | ||
setTimeout(() => { | ||
//setTimeout(() => { | ||
return callback(error, results); | ||
}, 0); | ||
//}, 0); | ||
}); | ||
@@ -122,0 +127,0 @@ } |
{ | ||
"name": "pure-live-pg", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "PostgreSQL package to support realtime applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52650
1448