prostgles-server 4.2.86 → 4.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1023,17 +1023,17 @@ export const isomorphicQueries = async (db: DBOFullyTyped | DBHandlerClient, log
|
|
|
1023
1023
|
await tryRunP("subscribe to escaped table name", async (resolve, reject) => {
|
|
1024
1024
|
const filter = { [`"text_col0"`]: "0" }
|
|
1025
1025
|
let runs = 0;
|
|
1026
|
-
setTimeout(() => {
|
|
1027
|
-
/** Used for debugging
|
|
1026
|
+
setTimeout(async () => {
|
|
1027
|
+
/** Used for debugging */
|
|
1028
1028
|
if(runs < 2){
|
|
1029
|
-
const appName = db.sql?.(`
|
|
1029
|
+
const appName = await db.sql?.(`
|
|
1030
1030
|
SELECT application_name
|
|
1031
1031
|
FROM pg_catalog.pg_stat_activity
|
|
1032
1032
|
WHERE pid = pg_backend_pid()
|
|
1033
1033
|
`, [], { returnType: "rows" });
|
|
1034
|
-
const apps = db.sql?.(`SELECT * FROM prostgles.apps`, [], { returnType: "
|
|
1035
|
-
const app_triggers = db.sql?.(`SELECT * FROM prostgles.app_triggers`, [], { returnType: "rows" });
|
|
1036
|
-
log(JSON.stringify({appName, apps, app_triggers}));
|
|
1034
|
+
const apps = await db.sql?.(`SELECT * FROM prostgles.apps`, [], { returnType: "value" });
|
|
1035
|
+
const app_triggers = await db.sql?.(`SELECT * FROM prostgles.app_triggers`, [], { returnType: "rows" });
|
|
1036
|
+
log(JSON.stringify({ appName, apps, app_triggers }));
|
|
1037
1037
|
}
|
|
1038
1038
|
}, 2000);
|
|
1039
1039
|
const sub = await db[`"""quoted0"""`].subscribe!(filter, { }, async items => {
|
|
@@ -1046,10 +1046,14 @@ export const isomorphicQueries = async (db: DBOFullyTyped | DBHandlerClient, log
|
|
|
1046
1046
|
if(runs < 2){
|
|
1047
1047
|
return;
|
|
1048
1048
|
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1049
|
+
try {
|
|
1050
|
+
await testToEnsureTriggersAreDisabled(sub, `"""quoted0"""`)
|
|
1051
|
+
resolve(true);
|
|
1052
|
+
} catch(e){
|
|
1053
|
+
reject(e);
|
|
1054
|
+
}
|
|
1051
1055
|
}
|
|
1052
|
-
});
|
|
1056
|
+
}).catch(reject);
|
|
1053
1057
|
});
|
|
1054
1058
|
});
|
|
1055
1059
|
|