From a481c370df702aef1569a01bfeba664506a7ee68 Mon Sep 17 00:00:00 2001 From: prostgles Date: Fri, 27 Oct 2023 20:44:13 +0000 Subject: [PATCH] add fileTable rules --- lib/DboBuilder/insertDataParse.ts | 8 ------ lib/PubSubManager/initPubSubManager.ts | 8 ++++-- package-lock.json | 4 +-- package.json | 2 +- tests/client/PID.txt | 2 +- tests/server/DBoGenerated.d.ts | 34 -------------------------- tests/server/package-lock.json | 2 +- 7 files changed, 11 insertions(+), 49 deletions(-) diff --git a/lib/DboBuilder/insertDataParse.ts b/lib/DboBuilder/insertDataParse.ts index 4aafcfe1..e3228bd7 100644 --- a/lib/DboBuilder/insertDataParse.ts +++ b/lib/DboBuilder/insertDataParse.ts @@ -122,11 +122,6 @@ export async function insertDataParse( const extraKeys = getExtraKeys(row); const colInserts = getColumnInserts(row); - /* Upload file then continue insert */ - // if (this.is_media) { - // return uploadFile.bind(this)(row, validate, localParams) - - // } else /* Potentially a nested join */ if (hasNestedInserts) { @@ -278,9 +273,6 @@ export async function insertDataParse( })); const result = isMultiInsert ? _data : _data[0]; - // if(validate && !isNestedInsert){ - // result = isMultiInsert? await Promise.all(_data.map(async d => await validate({ ...d }))) : await validate({ ..._data[0] }); - // } const res = hasNestedInserts ? { insertResult: result } : { data: result }; diff --git a/lib/PubSubManager/initPubSubManager.ts b/lib/PubSubManager/initPubSubManager.ts index 696a3991..730d3524 100644 --- a/lib/PubSubManager/initPubSubManager.ts +++ b/lib/PubSubManager/initPubSubManager.ts @@ -92,7 +92,8 @@ export async function initPubSubManager(this: PubSubManager): Promise { + this.db.any(` /* ${queryIdentifier} ${REALTIME_TRIGGER_CHECK_QUERY} @@ -100,14 +101,17 @@ export async function initPubSubManager(this: PubSubManager): Promise pg_backend_pid() AND query = \${queryIdentifier}; END $$; `, { queryTimeoutMillis, queryIdentifier }) + }, queryTimeoutMillis); await this.db.any(checkForStaleTriggers); + clearTimeout(timeout); + tries = 5; log("updated last_check"); } catch (e: any) { diff --git a/package-lock.json b/package-lock.json index d9891228..b30daf83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "prostgles-server", - "version": "4.1.98", + "version": "4.1.99", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "prostgles-server", - "version": "4.1.98", + "version": "4.1.99", "license": "MIT", "dependencies": { "@types/express": "^4.17.13", diff --git a/package.json b/package.json index b3b0038c..6572a736 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prostgles-server", - "version": "4.1.98", + "version": "4.1.99", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/tests/client/PID.txt b/tests/client/PID.txt index a3cedf05..604066f7 100644 --- a/tests/client/PID.txt +++ b/tests/client/PID.txt @@ -1 +1 @@ -30132 +1097907 diff --git a/tests/server/DBoGenerated.d.ts b/tests/server/DBoGenerated.d.ts index e1cdc6e8..8c7f6880 100644 --- a/tests/server/DBoGenerated.d.ts +++ b/tests/server/DBoGenerated.d.ts @@ -63,16 +63,6 @@ export type DBSchemaGenerated = { id?: number; }; }; - dmesg_logs: { - is_view: false; - select: true; - insert: true; - update: true; - delete: true; - columns: { - log?: null | string; - }; - }; ex_j_ins: { is_view: false; select: true; @@ -86,30 +76,6 @@ export type DBSchemaGenerated = { public?: null | string; }; }; - files: { - is_view: false; - select: true; - insert: true; - update: true; - delete: true; - columns: { - added?: string; - cloud_url?: null | string; - content_length?: number; - content_type: string; - deleted?: null | number; - deleted_from_storage?: null | number; - description?: null | string; - etag?: null | string; - extension: string; - id?: string; - name: string; - original_name: string; - signed_url?: null | string; - signed_url_expires?: null | number; - url: string; - }; - }; geography_columns: { is_view: true; select: true; diff --git a/tests/server/package-lock.json b/tests/server/package-lock.json index 1d424aa7..3681a0af 100644 --- a/tests/server/package-lock.json +++ b/tests/server/package-lock.json @@ -21,7 +21,7 @@ }, "../..": { "name": "prostgles-server", - "version": "4.1.98", + "version": "4.1.99", "license": "MIT", "dependencies": { "@types/express": "^4.17.13",