prostgles-server 4.0.47 → 4.0.49
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/dist/PubSubManager/getInitQuery.d.ts.map +1 -1
- package/dist/PubSubManager/getInitQuery.js +6 -7
- package/dist/PubSubManager/getInitQuery.js.map +1 -1
- package/lib/PubSubManager/getInitQuery.d.ts.map +1 -1
- package/lib/PubSubManager/getInitQuery.js +6 -7
- package/lib/PubSubManager/getInitQuery.ts +7 -8
- package/package.json +1 -1
- package/tests/client/PID.txt +1 -1
- package/tests/server/package-lock.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitQuery.d.ts","sourceRoot":"","sources":["../../lib/PubSubManager/getInitQuery.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"getInitQuery.d.ts","sourceRoot":"","sources":["../../lib/PubSubManager/getInitQuery.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGzD,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,eAAO,MAAM,YAAY,SAAwB,aAAa,KAAG,QAAQ,MAAM,CA6gB9E,CAAA"}
|
|
@@ -170,8 +170,7 @@ BEGIN
|
|
|
170
170
|
DECLARE err_c_ids INTEGER[];
|
|
171
171
|
DECLARE unions TEXT := '';
|
|
172
172
|
DECLARE query TEXT := '';
|
|
173
|
-
DECLARE
|
|
174
|
-
DECLARE erw RECORD;
|
|
173
|
+
DECLARE v_trigger RECORD;
|
|
175
174
|
DECLARE has_errors BOOLEAN := FALSE;
|
|
176
175
|
|
|
177
176
|
DECLARE err_text TEXT;
|
|
@@ -259,7 +258,7 @@ BEGIN
|
|
|
259
258
|
|
|
260
259
|
IF (t_ids IS NOT NULL OR has_errors) THEN
|
|
261
260
|
|
|
262
|
-
FOR
|
|
261
|
+
FOR v_trigger IN
|
|
263
262
|
SELECT app_id, string_agg(c_id::text, ',') as cids
|
|
264
263
|
FROM prostgles.v_triggers
|
|
265
264
|
WHERE id = ANY(t_ids)
|
|
@@ -268,7 +267,7 @@ BEGIN
|
|
|
268
267
|
LOOP
|
|
269
268
|
|
|
270
269
|
PERFORM pg_notify(
|
|
271
|
-
${(0, PubSubManager_1.asValue)(this.NOTIF_CHANNEL.preffix)} ||
|
|
270
|
+
${(0, PubSubManager_1.asValue)(this.NOTIF_CHANNEL.preffix)} || v_trigger.app_id ,
|
|
272
271
|
LEFT(concat_ws(
|
|
273
272
|
${(0, PubSubManager_1.asValue)(PubSubManager_1.PubSubManager.DELIMITER)},
|
|
274
273
|
|
|
@@ -277,9 +276,9 @@ BEGIN
|
|
|
277
276
|
COALESCE(TG_OP, 'MISSING'),
|
|
278
277
|
CASE WHEN has_errors
|
|
279
278
|
THEN concat_ws('; ', 'error', err_text, err_detail, err_hint, 'query: ' || query )
|
|
280
|
-
ELSE COALESCE(
|
|
279
|
+
ELSE COALESCE(v_trigger.cids, '')
|
|
281
280
|
END,
|
|
282
|
-
current_query()
|
|
281
|
+
COALESCE(current_query(), 'current_query ??')
|
|
283
282
|
${this.dboBuilder.prostgles.opts.DEBUG_MODE ? (", (select json_agg(t)::TEXT FROM (SELECT * from old_table) t), query") : ""}
|
|
284
283
|
), 7999)
|
|
285
284
|
);
|
|
@@ -480,7 +479,7 @@ BEGIN
|
|
|
480
479
|
CREATE OR REPLACE FUNCTION ${exports.DB_OBJ_NAMES.schema_watch_func}() RETURNS event_trigger AS $$
|
|
481
480
|
|
|
482
481
|
DECLARE curr_query TEXT := '';
|
|
483
|
-
DECLARE
|
|
482
|
+
DECLARE app RECORD;
|
|
484
483
|
|
|
485
484
|
BEGIN
|
|
486
485
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitQuery.js","sourceRoot":"","sources":["../../lib/PubSubManager/getInitQuery.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"getInitQuery.js","sourceRoot":"","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Query.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"getInitQuery.d.ts","sourceRoot":"","sources":["getInitQuery.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGzD,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,eAAO,MAAM,YAAY,SAAwB,aAAa,KAAG,QAAQ,MAAM,CA6gB9E,CAAA"}
|
|
@@ -170,8 +170,7 @@ BEGIN
|
|
|
170
170
|
DECLARE err_c_ids INTEGER[];
|
|
171
171
|
DECLARE unions TEXT := '';
|
|
172
172
|
DECLARE query TEXT := '';
|
|
173
|
-
DECLARE
|
|
174
|
-
DECLARE erw RECORD;
|
|
173
|
+
DECLARE v_trigger RECORD;
|
|
175
174
|
DECLARE has_errors BOOLEAN := FALSE;
|
|
176
175
|
|
|
177
176
|
DECLARE err_text TEXT;
|
|
@@ -259,7 +258,7 @@ BEGIN
|
|
|
259
258
|
|
|
260
259
|
IF (t_ids IS NOT NULL OR has_errors) THEN
|
|
261
260
|
|
|
262
|
-
FOR
|
|
261
|
+
FOR v_trigger IN
|
|
263
262
|
SELECT app_id, string_agg(c_id::text, ',') as cids
|
|
264
263
|
FROM prostgles.v_triggers
|
|
265
264
|
WHERE id = ANY(t_ids)
|
|
@@ -268,7 +267,7 @@ BEGIN
|
|
|
268
267
|
LOOP
|
|
269
268
|
|
|
270
269
|
PERFORM pg_notify(
|
|
271
|
-
${(0, PubSubManager_1.asValue)(this.NOTIF_CHANNEL.preffix)} ||
|
|
270
|
+
${(0, PubSubManager_1.asValue)(this.NOTIF_CHANNEL.preffix)} || v_trigger.app_id ,
|
|
272
271
|
LEFT(concat_ws(
|
|
273
272
|
${(0, PubSubManager_1.asValue)(PubSubManager_1.PubSubManager.DELIMITER)},
|
|
274
273
|
|
|
@@ -277,9 +276,9 @@ BEGIN
|
|
|
277
276
|
COALESCE(TG_OP, 'MISSING'),
|
|
278
277
|
CASE WHEN has_errors
|
|
279
278
|
THEN concat_ws('; ', 'error', err_text, err_detail, err_hint, 'query: ' || query )
|
|
280
|
-
ELSE COALESCE(
|
|
279
|
+
ELSE COALESCE(v_trigger.cids, '')
|
|
281
280
|
END,
|
|
282
|
-
current_query()
|
|
281
|
+
COALESCE(current_query(), 'current_query ??')
|
|
283
282
|
${this.dboBuilder.prostgles.opts.DEBUG_MODE ? (", (select json_agg(t)::TEXT FROM (SELECT * from old_table) t), query") : ""}
|
|
284
283
|
), 7999)
|
|
285
284
|
);
|
|
@@ -480,7 +479,7 @@ BEGIN
|
|
|
480
479
|
CREATE OR REPLACE FUNCTION ${exports.DB_OBJ_NAMES.schema_watch_func}() RETURNS event_trigger AS $$
|
|
481
480
|
|
|
482
481
|
DECLARE curr_query TEXT := '';
|
|
483
|
-
DECLARE
|
|
482
|
+
DECLARE app RECORD;
|
|
484
483
|
|
|
485
484
|
BEGIN
|
|
486
485
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { asValue,
|
|
2
|
+
import { asValue, PubSubManager } from "./PubSubManager";
|
|
3
3
|
const { version } = require("../../package.json");
|
|
4
4
|
|
|
5
5
|
export const DB_OBJ_NAMES = {
|
|
@@ -172,8 +172,7 @@ BEGIN
|
|
|
172
172
|
DECLARE err_c_ids INTEGER[];
|
|
173
173
|
DECLARE unions TEXT := '';
|
|
174
174
|
DECLARE query TEXT := '';
|
|
175
|
-
DECLARE
|
|
176
|
-
DECLARE erw RECORD;
|
|
175
|
+
DECLARE v_trigger RECORD;
|
|
177
176
|
DECLARE has_errors BOOLEAN := FALSE;
|
|
178
177
|
|
|
179
178
|
DECLARE err_text TEXT;
|
|
@@ -261,7 +260,7 @@ BEGIN
|
|
|
261
260
|
|
|
262
261
|
IF (t_ids IS NOT NULL OR has_errors) THEN
|
|
263
262
|
|
|
264
|
-
FOR
|
|
263
|
+
FOR v_trigger IN
|
|
265
264
|
SELECT app_id, string_agg(c_id::text, ',') as cids
|
|
266
265
|
FROM prostgles.v_triggers
|
|
267
266
|
WHERE id = ANY(t_ids)
|
|
@@ -270,7 +269,7 @@ BEGIN
|
|
|
270
269
|
LOOP
|
|
271
270
|
|
|
272
271
|
PERFORM pg_notify(
|
|
273
|
-
${asValue(this.NOTIF_CHANNEL.preffix)} ||
|
|
272
|
+
${asValue(this.NOTIF_CHANNEL.preffix)} || v_trigger.app_id ,
|
|
274
273
|
LEFT(concat_ws(
|
|
275
274
|
${asValue(PubSubManager.DELIMITER)},
|
|
276
275
|
|
|
@@ -279,9 +278,9 @@ BEGIN
|
|
|
279
278
|
COALESCE(TG_OP, 'MISSING'),
|
|
280
279
|
CASE WHEN has_errors
|
|
281
280
|
THEN concat_ws('; ', 'error', err_text, err_detail, err_hint, 'query: ' || query )
|
|
282
|
-
ELSE COALESCE(
|
|
281
|
+
ELSE COALESCE(v_trigger.cids, '')
|
|
283
282
|
END,
|
|
284
|
-
current_query()
|
|
283
|
+
COALESCE(current_query(), 'current_query ??')
|
|
285
284
|
${this.dboBuilder.prostgles.opts.DEBUG_MODE? (", (select json_agg(t)::TEXT FROM (SELECT * from old_table) t), query") : ""}
|
|
286
285
|
), 7999)
|
|
287
286
|
);
|
|
@@ -482,7 +481,7 @@ BEGIN
|
|
|
482
481
|
CREATE OR REPLACE FUNCTION ${DB_OBJ_NAMES.schema_watch_func}() RETURNS event_trigger AS $$
|
|
483
482
|
|
|
484
483
|
DECLARE curr_query TEXT := '';
|
|
485
|
-
DECLARE
|
|
484
|
+
DECLARE app RECORD;
|
|
486
485
|
|
|
487
486
|
BEGIN
|
|
488
487
|
|
package/package.json
CHANGED
package/tests/client/PID.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
156536
|