prostgles-server 4.2.567 → 4.2.569
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/Auth/AuthTypes.d.ts +5 -5
- package/dist/Auth/AuthTypes.d.ts.map +1 -1
- package/dist/Auth/AuthTypes.js.map +1 -1
- package/dist/Auth/endpoints/setCatchAllRequestHandler.d.ts.map +1 -1
- package/dist/Auth/endpoints/setCatchAllRequestHandler.js +2 -2
- package/dist/Auth/endpoints/setCatchAllRequestHandler.js.map +1 -1
- package/dist/DBSchemaBuilder/getColumnTypescriptDefinition.d.ts +1 -1
- package/dist/DBSchemaBuilder/getColumnTypescriptDefinition.d.ts.map +1 -1
- package/dist/DBSchemaBuilder/getDBGeneratedSchema.d.ts +1 -1
- package/dist/DBSchemaBuilder/getDBGeneratedSchema.d.ts.map +1 -1
- package/dist/DboBuilder/DboBuilder.js +4 -4
- package/dist/DboBuilder/DboBuilder.js.map +1 -1
- package/dist/DboBuilder/DboBuilderTypes.d.ts +2 -18
- package/dist/DboBuilder/DboBuilderTypes.d.ts.map +1 -1
- package/dist/DboBuilder/DboBuilderTypes.js.map +1 -1
- package/dist/DboBuilder/TableHandler/TableHandler.d.ts +15 -5
- package/dist/DboBuilder/TableHandler/TableHandler.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/TableHandler.js +4 -3
- package/dist/DboBuilder/TableHandler/TableHandler.js.map +1 -1
- package/dist/DboBuilder/TableHandler/delete.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/delete.js +17 -14
- package/dist/DboBuilder/TableHandler/delete.js.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insert.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insert.js +3 -12
- package/dist/DboBuilder/TableHandler/insert/insert.js.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insertNestedRecords.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insertNestedRecords.js +10 -15
- package/dist/DboBuilder/TableHandler/insert/insertNestedRecords.js.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insertRowWithNestedRecords.js +1 -1
- package/dist/DboBuilder/TableHandler/insert/insertRowWithNestedRecords.js.map +1 -1
- package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.d.ts +8 -6
- package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.js +30 -48
- package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.js.map +1 -1
- package/dist/DboBuilder/TableHandler/update.d.ts +1 -1
- package/dist/DboBuilder/TableHandler/update.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/update.js +8 -18
- package/dist/DboBuilder/TableHandler/update.js.map +1 -1
- package/dist/DboBuilder/TableHandler/updateFile.d.ts +2 -3
- package/dist/DboBuilder/TableHandler/updateFile.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/updateFile.js +8 -28
- package/dist/DboBuilder/TableHandler/updateFile.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/ViewHandler.d.ts +2 -2
- package/dist/DboBuilder/ViewHandler/ViewHandler.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/getInfo.d.ts +1 -1
- package/dist/DboBuilder/ViewHandler/getInfo.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/getInfo.js +12 -1
- package/dist/DboBuilder/ViewHandler/getInfo.js.map +1 -1
- package/dist/DboBuilder/getColumns.d.ts.map +1 -1
- package/dist/DboBuilder/getColumns.js +29 -4
- package/dist/DboBuilder/getColumns.js.map +1 -1
- package/dist/DboBuilder/schema/getTablesForSchemaPostgresSQL.d.ts +2 -2
- package/dist/DboBuilder/uploadFile.d.ts +5 -6
- package/dist/DboBuilder/uploadFile.d.ts.map +1 -1
- package/dist/DboBuilder/uploadFile.js +28 -42
- package/dist/DboBuilder/uploadFile.js.map +1 -1
- package/dist/FileManager/FileManager.d.ts +22 -78
- package/dist/FileManager/FileManager.d.ts.map +1 -1
- package/dist/FileManager/FileManager.js +1 -219
- package/dist/FileManager/FileManager.js.map +1 -1
- package/dist/FileManager/getFileTableConfig.d.ts +26 -0
- package/dist/FileManager/getFileTableConfig.d.ts.map +1 -0
- package/dist/FileManager/getFileTableConfig.js +115 -0
- package/dist/FileManager/getFileTableConfig.js.map +1 -0
- package/dist/FileManager/getLocalStorageClient.d.ts +3 -0
- package/dist/FileManager/getLocalStorageClient.d.ts.map +1 -0
- package/dist/FileManager/getLocalStorageClient.js +105 -0
- package/dist/FileManager/getLocalStorageClient.js.map +1 -0
- package/dist/FileManager/getValidatedFileType.d.ts +2 -2
- package/dist/FileManager/getValidatedFileType.d.ts.map +1 -1
- package/dist/FileManager/getValidatedFileType.js +7 -9
- package/dist/FileManager/getValidatedFileType.js.map +1 -1
- package/dist/FileManager/setupFileServeHandler.d.ts +9 -0
- package/dist/FileManager/setupFileServeHandler.d.ts.map +1 -0
- package/dist/FileManager/setupFileServeHandler.js +114 -0
- package/dist/FileManager/setupFileServeHandler.js.map +1 -0
- package/dist/Filtering/Filtering.d.ts +1 -1
- package/dist/Logging.d.ts +1 -1
- package/dist/Logging.d.ts.map +1 -1
- package/dist/Prostgles.d.ts +52 -6
- package/dist/Prostgles.d.ts.map +1 -1
- package/dist/Prostgles.js +8 -47
- package/dist/Prostgles.js.map +1 -1
- package/dist/ProstglesTypes.d.ts +23 -21
- package/dist/ProstglesTypes.d.ts.map +1 -1
- package/dist/ProstglesTypes.js.map +1 -1
- package/dist/PubSubManager/notifListener.d.ts.map +1 -1
- package/dist/PubSubManager/notifListener.js +0 -1
- package/dist/PubSubManager/notifListener.js.map +1 -1
- package/dist/PublishParser/getDBSchemaTable.d.ts +2 -2
- package/dist/PublishParser/getDBSchemaTable.d.ts.map +1 -1
- package/dist/PublishParser/getDBSchemaTable.js +5 -3
- package/dist/PublishParser/getDBSchemaTable.js.map +1 -1
- package/dist/PublishParser/getSchemaFromPublish.d.ts.map +1 -1
- package/dist/PublishParser/getSchemaFromPublish.js +2 -2
- package/dist/PublishParser/getSchemaFromPublish.js.map +1 -1
- package/dist/PublishParser/publishTypesAndUtils.d.ts +1 -0
- package/dist/PublishParser/publishTypesAndUtils.d.ts.map +1 -1
- package/dist/PublishParser/publishTypesAndUtils.js.map +1 -1
- package/dist/RestApi.d.ts +1 -5
- package/dist/RestApi.d.ts.map +1 -1
- package/dist/RestApi.js +10 -5
- package/dist/RestApi.js.map +1 -1
- package/dist/TableConfig/{TableConfig.d.ts → TableConfigTypes.d.ts} +19 -64
- package/dist/TableConfig/TableConfigTypes.d.ts.map +1 -0
- package/dist/TableConfig/TableConfigTypes.js +3 -0
- package/dist/TableConfig/TableConfigTypes.js.map +1 -0
- package/dist/TableConfig/TableConfigurator.d.ts +104 -0
- package/dist/TableConfig/TableConfigurator.d.ts.map +1 -0
- package/dist/TableConfig/{TableConfig.js → TableConfigurator.js} +31 -44
- package/dist/TableConfig/TableConfigurator.js.map +1 -0
- package/dist/TableConfig/applyTableConfig.d.ts.map +1 -1
- package/dist/TableConfig/applyTableConfig.js +0 -1
- package/dist/TableConfig/applyTableConfig.js.map +1 -1
- package/dist/TableConfig/getColumnConfig.d.ts +1 -1
- package/dist/TableConfig/getColumnConfig.d.ts.map +1 -1
- package/dist/TableConfig/getColumnSQLDefinitionQuery.d.ts +1 -1
- package/dist/TableConfig/getColumnSQLDefinitionQuery.d.ts.map +1 -1
- package/dist/TableConfig/getColumnSQLDefinitionQuery.js +1 -1
- package/dist/TableConfig/getColumnSQLDefinitionQuery.js.map +1 -1
- package/dist/TableConfig/getConstraintDefinitionQueries.d.ts +1 -1
- package/dist/TableConfig/getConstraintDefinitionQueries.d.ts.map +1 -1
- package/dist/TableConfig/getCreateSchemaQueries.d.ts +26 -8
- package/dist/TableConfig/getCreateSchemaQueries.d.ts.map +1 -1
- package/dist/TableConfig/getSchemaDiffQueries.d.ts.map +1 -1
- package/dist/TableConfig/getSchemaDiffQueries.js +12 -8
- package/dist/TableConfig/getSchemaDiffQueries.js.map +1 -1
- package/dist/TableConfig/getTableColumnQueries.d.ts +1 -1
- package/dist/TableConfig/getTableColumnQueries.d.ts.map +1 -1
- package/dist/TableConfig/getTableColumnQueries.js +19 -19
- package/dist/TableConfig/getTableColumnQueries.js.map +1 -1
- package/dist/TableConfig/getTableConfigSchemaQueries.d.ts +26 -10
- package/dist/TableConfig/getTableConfigSchemaQueries.d.ts.map +1 -1
- package/dist/TableConfig/getTableConfigSchemaQueries.js +8 -10
- package/dist/TableConfig/getTableConfigSchemaQueries.js.map +1 -1
- package/dist/TableConfig/indexes/getIndexesQueries.d.ts +1 -1
- package/dist/TableConfig/indexes/getIndexesQueries.d.ts.map +1 -1
- package/dist/TableConfig/initTableConfig.d.ts +1 -1
- package/dist/TableConfig/initTableConfig.d.ts.map +1 -1
- package/dist/TableConfig/initTableConfig.js +6 -3
- package/dist/TableConfig/initTableConfig.js.map +1 -1
- package/dist/WebsocketAPI/getClientSchema.d.ts.map +1 -1
- package/dist/WebsocketAPI/getClientSchema.js +6 -1
- package/dist/WebsocketAPI/getClientSchema.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/initProstgles.d.ts.map +1 -1
- package/dist/initProstgles.js +2 -5
- package/dist/initProstgles.js.map +1 -1
- package/dist/runClientRequest.js +1 -1
- package/dist/runClientRequest.js.map +1 -1
- package/dist/updateConfiguration.d.ts.map +1 -1
- package/dist/updateConfiguration.js +0 -3
- package/dist/updateConfiguration.js.map +1 -1
- package/eslint.config.mjs +0 -3
- package/lib/Auth/AuthTypes.ts +6 -7
- package/lib/Auth/endpoints/setCatchAllRequestHandler.ts +6 -2
- package/lib/DBSchemaBuilder/getColumnTypescriptDefinition.ts +1 -1
- package/lib/DBSchemaBuilder/getDBGeneratedSchema.ts +1 -1
- package/lib/DboBuilder/DboBuilder.ts +4 -4
- package/lib/DboBuilder/DboBuilderTypes.ts +7 -20
- package/lib/DboBuilder/TableHandler/TableHandler.ts +7 -4
- package/lib/DboBuilder/TableHandler/delete.ts +23 -17
- package/lib/DboBuilder/TableHandler/insert/insert.ts +3 -12
- package/lib/DboBuilder/TableHandler/insert/insertNestedRecords.ts +13 -17
- package/lib/DboBuilder/TableHandler/insert/insertRowWithNestedRecords.ts +1 -1
- package/lib/DboBuilder/TableHandler/onDeleteFromFileTable.ts +41 -54
- package/lib/DboBuilder/TableHandler/update.ts +8 -19
- package/lib/DboBuilder/TableHandler/updateFile.ts +20 -42
- package/lib/DboBuilder/ViewHandler/ViewHandler.ts +1 -1
- package/lib/DboBuilder/ViewHandler/getInfo.ts +19 -2
- package/lib/DboBuilder/getColumns.ts +40 -4
- package/lib/DboBuilder/uploadFile.ts +34 -50
- package/lib/FileManager/FileManager.ts +23 -249
- package/lib/FileManager/getFileTableConfig.ts +142 -0
- package/lib/FileManager/getLocalStorageClient.ts +118 -0
- package/lib/FileManager/getValidatedFileType.ts +14 -22
- package/lib/FileManager/setupFileServeHandler.ts +102 -0
- package/lib/Logging.ts +0 -3
- package/lib/Prostgles.ts +9 -44
- package/lib/ProstglesTypes.ts +34 -23
- package/lib/PubSubManager/notifListener.ts +0 -2
- package/lib/PublishParser/getDBSchemaTable.ts +6 -3
- package/lib/PublishParser/getSchemaFromPublish.ts +2 -1
- package/lib/PublishParser/publishTypesAndUtils.ts +1 -0
- package/lib/RestApi.ts +12 -12
- package/lib/TableConfig/{TableConfig.ts → TableConfigTypes.ts} +18 -217
- package/lib/TableConfig/TableConfigurator.ts +191 -0
- package/lib/TableConfig/applyTableConfig.ts +2 -3
- package/lib/TableConfig/getColumnConfig.ts +2 -2
- package/lib/TableConfig/getColumnSQLDefinitionQuery.ts +2 -2
- package/lib/TableConfig/getConstraintDefinitionQueries.ts +1 -1
- package/lib/TableConfig/getCreateSchemaQueries.ts +1 -1
- package/lib/TableConfig/getSchemaDiffQueries.ts +14 -11
- package/lib/TableConfig/getTableColumnQueries.ts +22 -20
- package/lib/TableConfig/getTableConfigSchemaQueries.ts +20 -22
- package/lib/TableConfig/indexes/getIndexesQueries.ts +1 -1
- package/lib/TableConfig/initTableConfig.ts +7 -6
- package/lib/WebsocketAPI/getClientSchema.ts +7 -1
- package/lib/index.ts +3 -2
- package/lib/initProstgles.ts +2 -6
- package/lib/runClientRequest.ts +1 -1
- package/lib/updateConfiguration.ts +0 -3
- package/package.json +2 -3
- package/dist/FileManager/initFileManager.d.ts +0 -18
- package/dist/FileManager/initFileManager.d.ts.map +0 -1
- package/dist/FileManager/initFileManager.js +0 -257
- package/dist/FileManager/initFileManager.js.map +0 -1
- package/dist/FileManager/upload.d.ts +0 -4
- package/dist/FileManager/upload.d.ts.map +0 -1
- package/dist/FileManager/upload.js +0 -90
- package/dist/FileManager/upload.js.map +0 -1
- package/dist/FileManager/uploadStream.d.ts +0 -4
- package/dist/FileManager/uploadStream.d.ts.map +0 -1
- package/dist/FileManager/uploadStream.js +0 -100
- package/dist/FileManager/uploadStream.js.map +0 -1
- package/dist/TableConfig/TableConfig.d.ts.map +0 -1
- package/dist/TableConfig/TableConfig.js.map +0 -1
- package/lib/FileManager/initFileManager.ts +0 -254
- package/lib/FileManager/upload.ts +0 -59
- package/lib/FileManager/uploadStream.ts +0 -76
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "prostgles-types";
|
|
11
11
|
import type { TableSchemaColumn } from "../DboBuilder/DboBuilder";
|
|
12
12
|
import { escapeTSNames } from "../utils/utils";
|
|
13
|
-
import type { TableConfig } from "../TableConfig/
|
|
13
|
+
import type { TableConfig } from "../TableConfig/TableConfigTypes";
|
|
14
14
|
import { getColumnConfig } from "../TableConfig/getColumnConfig";
|
|
15
15
|
|
|
16
16
|
export const getColumnTypescriptDefinition = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isDefined, isEmpty, type TableSchema } from "prostgles-types";
|
|
2
|
-
import type { TableConfig } from "../TableConfig/
|
|
2
|
+
import type { TableConfig } from "../TableConfig/TableConfigTypes";
|
|
3
3
|
import { escapeTSNames } from "../utils/utils";
|
|
4
4
|
import { getColumnTypescriptDefinition } from "./getColumnTypescriptDefinition";
|
|
5
5
|
import { fromEntries } from "../PublishParser/applyScopeToTableRules";
|
|
@@ -242,7 +242,7 @@ export class DboBuilder {
|
|
|
242
242
|
tableOrViewInfo: tov,
|
|
243
243
|
dboBuilder: this,
|
|
244
244
|
tx: undefined,
|
|
245
|
-
config: this.prostgles.
|
|
245
|
+
config: this.prostgles.mergedTableConfig?.[tov.name],
|
|
246
246
|
joinPaths: this.shortestJoinPaths,
|
|
247
247
|
});
|
|
248
248
|
this.dbo[tov.name] = tableHandler;
|
|
@@ -270,7 +270,7 @@ export class DboBuilder {
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
this.tableTsDefinitions = getDBGeneratedSchema({
|
|
273
|
-
config: this.prostgles.
|
|
273
|
+
config: this.prostgles.mergedTableConfig,
|
|
274
274
|
tablesOrViews,
|
|
275
275
|
});
|
|
276
276
|
this.functionTsDefinitions = getFunctionsTypescriptSchema(
|
|
@@ -306,7 +306,7 @@ export class DboBuilder {
|
|
|
306
306
|
: { tsSchema: string; tablesOrViews: TableSchema[] } => {
|
|
307
307
|
const getSchema = (tablesOrViews: TableSchema[]) => {
|
|
308
308
|
const tableTsDefinitions = getDBGeneratedSchema({
|
|
309
|
-
config: this.prostgles.
|
|
309
|
+
config: this.prostgles.mergedTableConfig,
|
|
310
310
|
tablesOrViews: [
|
|
311
311
|
...tablesOrViews,
|
|
312
312
|
...extraTables.filter(
|
|
@@ -379,7 +379,7 @@ export class DboBuilder {
|
|
|
379
379
|
tableOrViewInfo: tov,
|
|
380
380
|
dboBuilder: this,
|
|
381
381
|
tx: { t, dbTX },
|
|
382
|
-
config: this.prostgles.
|
|
382
|
+
config: this.prostgles.mergedTableConfig?.[tov.name],
|
|
383
383
|
joinPaths: this.shortestJoinPaths,
|
|
384
384
|
});
|
|
385
385
|
});
|
|
@@ -9,7 +9,12 @@ import type {
|
|
|
9
9
|
TableInfo as TInfo,
|
|
10
10
|
UserLike,
|
|
11
11
|
} from "prostgles-types";
|
|
12
|
-
import type {
|
|
12
|
+
import type {
|
|
13
|
+
AuthClientRequest,
|
|
14
|
+
AuthResultWithSID,
|
|
15
|
+
BasicSession,
|
|
16
|
+
SessionUser,
|
|
17
|
+
} from "../Auth/AuthTypes";
|
|
13
18
|
import type { BasicCallback } from "../PubSubManager/PubSubManager";
|
|
14
19
|
import type {
|
|
15
20
|
DeleteRule,
|
|
@@ -88,25 +93,6 @@ export type SortItem = {
|
|
|
88
93
|
}
|
|
89
94
|
);
|
|
90
95
|
|
|
91
|
-
export type Media = {
|
|
92
|
-
id?: string;
|
|
93
|
-
title?: string;
|
|
94
|
-
extension?: string;
|
|
95
|
-
content_type?: string;
|
|
96
|
-
content_length?: number;
|
|
97
|
-
url?: string;
|
|
98
|
-
added?: Date;
|
|
99
|
-
signed_url?: string;
|
|
100
|
-
signed_url_expires?: number;
|
|
101
|
-
name?: string;
|
|
102
|
-
original_name?: string;
|
|
103
|
-
etag?: string;
|
|
104
|
-
deleted?: string | null;
|
|
105
|
-
deleted_from_storage?: string | null;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export type ParsedMedia = Required<Pick<Media, "extension" | "content_type">>;
|
|
109
|
-
|
|
110
96
|
export type TxCB<R = any, TH = DbTxTableHandlers> = {
|
|
111
97
|
(t: TH, _t: pgPromise.ITask<{}>): R;
|
|
112
98
|
};
|
|
@@ -199,6 +185,7 @@ export type LocalParams = {
|
|
|
199
185
|
clientReq?: AuthClientRequest | undefined;
|
|
200
186
|
isRemoteRequest?: {
|
|
201
187
|
user?: UserLike | undefined;
|
|
188
|
+
clientInfo: AuthResultWithSID | undefined;
|
|
202
189
|
};
|
|
203
190
|
scope?: PermissionScope | undefined;
|
|
204
191
|
func?: () => any;
|
|
@@ -17,8 +17,7 @@ import type {
|
|
|
17
17
|
UpdateRule,
|
|
18
18
|
} from "../../PublishParser/PublishParser";
|
|
19
19
|
import { getSyncBatchOptions } from "../../PubSubManager/SyncReplication/getSyncBatchOptions";
|
|
20
|
-
import type
|
|
21
|
-
import type { TableDefinition } from "../../TableConfig/TableConfig";
|
|
20
|
+
import type { TableDefinition } from "../../TableConfig/TableConfigTypes";
|
|
22
21
|
import type { DboBuilder, Filter, LocalParams, TableHandlers } from "../DboBuilder";
|
|
23
22
|
import { getErrorAsObject, getSerializedClientErrorFromPGError } from "../DboBuilder";
|
|
24
23
|
import type { TableSchema } from "../DboBuilderTypes";
|
|
@@ -35,6 +34,7 @@ import { update } from "./update";
|
|
|
35
34
|
import { updateBatch } from "./updateBatch";
|
|
36
35
|
import { upsert } from "./upsert";
|
|
37
36
|
import { isApplicableHook } from "./isApplicableHook";
|
|
37
|
+
import type { TableConfigurator } from "../../TableConfig/TableConfigurator";
|
|
38
38
|
|
|
39
39
|
export type ValidatedParams = {
|
|
40
40
|
row: AnyObject;
|
|
@@ -85,6 +85,7 @@ export class TableHandler extends ViewHandler {
|
|
|
85
85
|
row: AnyObject,
|
|
86
86
|
localParams: LocalParams | undefined,
|
|
87
87
|
command: "insert" | "update",
|
|
88
|
+
filter: AnyObject | undefined,
|
|
88
89
|
) => {
|
|
89
90
|
const transaction = this.getTransaction(localParams);
|
|
90
91
|
const hooks = this.getBeforeHooks(command, [row]);
|
|
@@ -94,11 +95,12 @@ export class TableHandler extends ViewHandler {
|
|
|
94
95
|
const isApplicable = isApplicableHook(this, [newRow], hook, command);
|
|
95
96
|
if (!isApplicable) continue;
|
|
96
97
|
const hookResult = await hook.validate({
|
|
97
|
-
command
|
|
98
|
+
command,
|
|
98
99
|
data: newRow,
|
|
99
100
|
dbx: this.getFinalDbo(localParams),
|
|
100
101
|
localParams,
|
|
101
102
|
tx: transaction?.t || this.db,
|
|
103
|
+
filter,
|
|
102
104
|
});
|
|
103
105
|
if (hookResult) {
|
|
104
106
|
newRow = hookResult.row;
|
|
@@ -177,7 +179,8 @@ export class TableHandler extends ViewHandler {
|
|
|
177
179
|
const hasBeforeHooks =
|
|
178
180
|
command.name !== "delete" && this.getBeforeHooks(command.name, newRows).length > 0;
|
|
179
181
|
return {
|
|
180
|
-
shouldWrap:
|
|
182
|
+
shouldWrap:
|
|
183
|
+
!transaction && (hasAfterChecks || hasBeforeHooks || this.config?.hooks?.onInsteadOfDelete),
|
|
181
184
|
hasBeforeHooks,
|
|
182
185
|
hasAfterChecks,
|
|
183
186
|
};
|
|
@@ -140,16 +140,31 @@ export async function _delete(
|
|
|
140
140
|
return queryToReturn as unknown[];
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
143
|
+
const transaction = this.getTransaction(localParams);
|
|
144
|
+
const dbHandler = transaction?.t ?? this.db;
|
|
145
|
+
|
|
146
|
+
const isOneOrNone = includes(["row", "value"], params?.returnType);
|
|
147
|
+
const queryPromise = () =>
|
|
148
|
+
isOneOrNone ?
|
|
149
|
+
dbHandler.oneOrNone<AnyObject>(queryWithRLS).then((data) => (data ? [data] : []))
|
|
150
|
+
: dbHandler.any<AnyObject>(queryWithRLS);
|
|
151
|
+
|
|
152
|
+
const onInsteadOfDelete = this.config?.hooks?.onInsteadOfDelete;
|
|
153
|
+
if (onInsteadOfDelete) {
|
|
154
|
+
if (!transaction) {
|
|
155
|
+
throw new Error(
|
|
156
|
+
"onInsteadOfDelete requires a transaction. Please wrap the delete call in a transaction.",
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
const result = await onInsteadOfDelete({
|
|
149
160
|
queryType,
|
|
150
|
-
|
|
161
|
+
isOneOrNone,
|
|
162
|
+
dbx: transaction.dbTX,
|
|
163
|
+
tx: transaction.t,
|
|
164
|
+
returningQuery,
|
|
151
165
|
filterOpts,
|
|
152
166
|
});
|
|
167
|
+
|
|
153
168
|
await this._log({
|
|
154
169
|
command: "delete",
|
|
155
170
|
localParams,
|
|
@@ -158,16 +173,7 @@ export async function _delete(
|
|
|
158
173
|
});
|
|
159
174
|
return result;
|
|
160
175
|
}
|
|
161
|
-
|
|
162
|
-
const dbHandler = this.getTransaction(localParams)?.t ?? this.db;
|
|
163
|
-
|
|
164
|
-
const isOneOrNone = includes(["row", "value"], params?.returnType);
|
|
165
|
-
const queryPromise =
|
|
166
|
-
isOneOrNone ?
|
|
167
|
-
dbHandler.oneOrNone<AnyObject>(queryWithRLS).then((data) => (data ? [data] : []))
|
|
168
|
-
: dbHandler.any<AnyObject>(queryWithRLS);
|
|
169
|
-
|
|
170
|
-
const deletedRows = await queryPromise.catch((err) =>
|
|
176
|
+
const deletedRows = await queryPromise().catch((err) =>
|
|
171
177
|
rejectWithPGClientError(err, {
|
|
172
178
|
type: "tableMethod",
|
|
173
179
|
localParams,
|
|
@@ -93,23 +93,14 @@ export async function insert(
|
|
|
93
93
|
const successCallbacks: (() => void)[] = [];
|
|
94
94
|
const preValidatedRows: InsertedRowWithInfo[] = await Promise.all(
|
|
95
95
|
rows.map(async (nonValidated) => {
|
|
96
|
-
const { preValidate
|
|
96
|
+
const { preValidate } = rule ?? {};
|
|
97
97
|
const { tableConfigurator } = this.dboBuilder.prostgles;
|
|
98
98
|
if (!tableConfigurator) {
|
|
99
99
|
throw "tableConfigurator missing";
|
|
100
100
|
}
|
|
101
|
-
let row = await tableConfigurator.getPreInsertRow(this, {
|
|
102
|
-
dbx: this.getFinalDbo(localParams),
|
|
103
|
-
validate,
|
|
104
|
-
localParams,
|
|
105
|
-
row: nonValidated,
|
|
106
|
-
tx,
|
|
107
|
-
command: "insert",
|
|
108
|
-
data: nonValidated,
|
|
109
|
-
});
|
|
110
101
|
|
|
111
|
-
const beforeResult = await this.beforeEach(
|
|
112
|
-
row = beforeResult.row;
|
|
102
|
+
const beforeResult = await this.beforeEach(nonValidated, localParams, "insert", undefined);
|
|
103
|
+
let row = beforeResult.row;
|
|
113
104
|
beforeResult.successCallbacks.forEach((cb) => successCallbacks.push(cb));
|
|
114
105
|
|
|
115
106
|
if (preValidate) {
|
|
@@ -24,26 +24,22 @@ export async function insertNestedRecords(
|
|
|
24
24
|
this: TableHandler,
|
|
25
25
|
{ data, insertParams, tableRules, localParams }: InsertNestedRecordsArgs,
|
|
26
26
|
) {
|
|
27
|
-
const MEDIA_COL_NAMES = ["data", "name"];
|
|
28
|
-
|
|
29
27
|
const getExtraKeys = (row: AnyObject) =>
|
|
30
28
|
getKeys(row).filter((fieldName) => {
|
|
31
|
-
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
return true;
|
|
29
|
+
const matchingColumn = this.columns.find((c) => c.name === fieldName);
|
|
30
|
+
if (matchingColumn) return false;
|
|
31
|
+
if (
|
|
32
|
+
!isObject(row[fieldName]) &&
|
|
33
|
+
!Array.isArray(row[fieldName]) &&
|
|
34
|
+
row[fieldName] !== undefined
|
|
35
|
+
) {
|
|
36
|
+
throw new Error(
|
|
37
|
+
`Invalid/Disallowed field in data: ${fieldName}. If inserting nested records, the field must be an object or array.`,
|
|
38
|
+
);
|
|
39
|
+
} else if (!this.dboBuilder.dboMap.get(fieldName)) {
|
|
40
|
+
return false;
|
|
45
41
|
}
|
|
46
|
-
return
|
|
42
|
+
return true;
|
|
47
43
|
});
|
|
48
44
|
|
|
49
45
|
/**
|
|
@@ -187,7 +187,7 @@ export async function insertRowWithNestedRecords(
|
|
|
187
187
|
if (!colsRefT1.length || !colsRefT3.length)
|
|
188
188
|
throw "Incorrectly referenced or missing columns for nested insert";
|
|
189
189
|
|
|
190
|
-
const fileTable = this.dboBuilder.prostgles.
|
|
190
|
+
const fileTable = this.dboBuilder.prostgles.opts.fileTable?.tableName;
|
|
191
191
|
if (targetTable !== fileTable) {
|
|
192
192
|
throw "Only media allowed to have nested inserts more than 2 tables apart";
|
|
193
193
|
}
|
|
@@ -1,70 +1,57 @@
|
|
|
1
|
+
import type pgPromise from "pg-promise";
|
|
1
2
|
import type { AnyObject } from "prostgles-types";
|
|
2
3
|
import { asName, pickKeys } from "prostgles-types";
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
5
|
-
import type {
|
|
4
|
+
import type { FileTableConfig } from "../../ProstglesTypes";
|
|
5
|
+
import type { TableHandlers } from "../DboBuilder";
|
|
6
|
+
import type { FileTableRow } from "../../FileManager/getFileTableConfig";
|
|
6
7
|
|
|
7
8
|
type OnDeleteFromFileTableArgs = {
|
|
8
|
-
localParams: LocalParams | undefined;
|
|
9
|
-
queryType: "one" | "none" | "many" | "any";
|
|
10
9
|
returningQuery: undefined | string;
|
|
11
10
|
filterOpts: {
|
|
12
11
|
where: string;
|
|
13
12
|
filter: AnyObject;
|
|
14
13
|
};
|
|
14
|
+
t: pgPromise.ITask<{}>;
|
|
15
|
+
dbTX: TableHandlers;
|
|
16
|
+
isOneOrNone: boolean;
|
|
15
17
|
};
|
|
16
|
-
export async
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
) {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
export const onDeleteFromFileTable = async (
|
|
19
|
+
config: FileTableConfig,
|
|
20
|
+
{ dbTX, t, returningQuery, filterOpts, isOneOrNone }: OnDeleteFromFileTableArgs,
|
|
21
|
+
) => {
|
|
22
|
+
const { storageClient, tableName } = config;
|
|
23
|
+
const tableHandler = dbTX[tableName];
|
|
24
|
+
if (!tableHandler) {
|
|
25
|
+
throw new Error(`TableHandler for ${tableName} not found in dbTX`);
|
|
22
26
|
}
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
`UPDATE ${asName(
|
|
27
|
+
if (config.delayedDelete) {
|
|
28
|
+
const result = await t.any(
|
|
29
|
+
`UPDATE ${asName(tableName)} SET deleted = now() ${filterOpts.where} ${returningQuery ?? ""};`,
|
|
26
30
|
);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (!tbl.tx) throw new Error("Missing transaction object tx");
|
|
30
|
-
let files: { id: string; name: string }[] = [];
|
|
31
|
-
const totalFiles = await tbl.count(filterOpts.filter);
|
|
32
|
-
do {
|
|
33
|
-
const batch = (await tbl.find(filterOpts.filter, {
|
|
34
|
-
limit: 100,
|
|
35
|
-
offset: files.length,
|
|
36
|
-
})) as Required<Media>[];
|
|
37
|
-
files = [...files, ...batch];
|
|
38
|
-
} while (files.length < totalFiles);
|
|
39
|
-
|
|
40
|
-
const fileManager = tbl.dboBuilder.prostgles.fileManager;
|
|
41
|
-
if (!fileManager) throw new Error("fileManager missing");
|
|
42
|
-
|
|
43
|
-
for (const file of files) {
|
|
44
|
-
await tbl.tx.t.any(`DELETE FROM ${asName(this.name)} WHERE id = \${id}`, file);
|
|
45
|
-
}
|
|
46
|
-
/** If any table delete fails then do not delete files */
|
|
47
|
-
for (const file of files) {
|
|
48
|
-
await fileManager.deleteFile(file.name);
|
|
49
|
-
/** TODO: Keep track of deleted files in case of failure */
|
|
50
|
-
// await tbl.t?.any(`UPDATE ${asName(this.name)} SET deleted = NOW(), deleted_from_storage = NOW() WHERE id = ` + "${id}", file);
|
|
51
|
-
}
|
|
31
|
+
return (isOneOrNone ? result[0] : result) as undefined | AnyObject[];
|
|
32
|
+
}
|
|
52
33
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
let files: { id: string; name: string }[] = [];
|
|
35
|
+
const totalFiles = await tableHandler.count(filterOpts.filter);
|
|
36
|
+
do {
|
|
37
|
+
const batch = (await tableHandler.find(filterOpts.filter, {
|
|
38
|
+
limit: 100,
|
|
39
|
+
offset: files.length,
|
|
40
|
+
})) as FileTableRow[];
|
|
41
|
+
files = [...files, ...batch];
|
|
42
|
+
} while (files.length < totalFiles);
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
};
|
|
44
|
+
for (const file of files) {
|
|
45
|
+
await t.any(`DELETE FROM ${asName(tableName)} WHERE id = \${id}`, file);
|
|
46
|
+
}
|
|
47
|
+
/** If any table delete fails then do not delete files */
|
|
48
|
+
for (const file of files) {
|
|
49
|
+
await storageClient.delete(file.name);
|
|
50
|
+
}
|
|
59
51
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} else if (this.tx) {
|
|
63
|
-
return txDelete(this);
|
|
64
|
-
} else {
|
|
65
|
-
return this.dboBuilder.getTX((tx) => {
|
|
66
|
-
return txDelete(tx[this.name] as TableHandler);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
52
|
+
if (returningQuery) {
|
|
53
|
+
return files.map((f) => pickKeys(f, ["id", "name"]));
|
|
69
54
|
}
|
|
70
|
-
|
|
55
|
+
|
|
56
|
+
return undefined;
|
|
57
|
+
};
|
|
@@ -2,18 +2,17 @@ import type { AnyObject, UpdateParams } from "prostgles-types";
|
|
|
2
2
|
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
3
3
|
import type { Filter, LocalParams } from "../DboBuilder";
|
|
4
4
|
import { getErrorAsObject, getSerializedClientErrorFromPGError, withUserRLS } from "../DboBuilder";
|
|
5
|
+
import { getReturnTypeQuery } from "../ViewHandler/getReturnTypeQuery";
|
|
5
6
|
import { prepareNewData } from "./DataValidator";
|
|
7
|
+
import { getInsertTableRules } from "./insert/getInsertTableRules";
|
|
6
8
|
import { getReferenceColumnInserts } from "./insert/getReferenceColumnInserts";
|
|
7
9
|
import { runInsertUpdateQuery } from "./runInsertUpdateQuery";
|
|
8
10
|
import type { TableHandler } from "./TableHandler";
|
|
9
|
-
import { updateFile } from "./updateFile";
|
|
10
|
-
import { getInsertTableRules } from "./insert/getInsertTableRules";
|
|
11
|
-
import { getReturnTypeQuery } from "../ViewHandler/getReturnTypeQuery";
|
|
12
11
|
|
|
13
12
|
export async function update(
|
|
14
13
|
this: TableHandler,
|
|
15
14
|
filter: Filter,
|
|
16
|
-
|
|
15
|
+
newData: AnyObject,
|
|
17
16
|
params?: UpdateParams,
|
|
18
17
|
tableRules?: ParsedTableRule,
|
|
19
18
|
localParams?: LocalParams,
|
|
@@ -26,27 +25,17 @@ export async function update(
|
|
|
26
25
|
this.dboBuilder.getTX((th) =>
|
|
27
26
|
(th[this.name] as Partial<typeof this> | undefined)?.[ACTION]?.(
|
|
28
27
|
filter,
|
|
29
|
-
|
|
28
|
+
newData,
|
|
30
29
|
params,
|
|
31
30
|
tableRules,
|
|
32
31
|
localParams,
|
|
33
32
|
),
|
|
34
33
|
);
|
|
35
34
|
const rule = tableRules?.[ACTION];
|
|
36
|
-
if (this.shouldWrapInTx({ name: ACTION, rule }, localParams, [
|
|
35
|
+
if (this.shouldWrapInTx({ name: ACTION, rule }, localParams, [newData]).shouldWrap) {
|
|
37
36
|
return wrapInTx();
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
let newData = _newData;
|
|
41
|
-
if (this.is_media) {
|
|
42
|
-
({ newData } = await updateFile.bind(this)({
|
|
43
|
-
newData,
|
|
44
|
-
filter,
|
|
45
|
-
localParams,
|
|
46
|
-
tableRules,
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
39
|
const parsedRules = await this.parseUpdateRules(filter, params, tableRules, localParams);
|
|
51
40
|
if (localParams?.testRule) {
|
|
52
41
|
return parsedRules;
|
|
@@ -76,7 +65,7 @@ export async function update(
|
|
|
76
65
|
);
|
|
77
66
|
}
|
|
78
67
|
|
|
79
|
-
const beforeResult = await this.beforeEach(newData, localParams, "update");
|
|
68
|
+
const beforeResult = await this.beforeEach(newData, localParams, "update", filter);
|
|
80
69
|
newData = beforeResult.row;
|
|
81
70
|
|
|
82
71
|
const { data, allowedCols } = prepareNewData({
|
|
@@ -206,7 +195,7 @@ export async function update(
|
|
|
206
195
|
await this._log({
|
|
207
196
|
command: "update",
|
|
208
197
|
localParams,
|
|
209
|
-
data: { filter,
|
|
198
|
+
data: { filter, newData, params },
|
|
210
199
|
duration: Date.now() - start,
|
|
211
200
|
});
|
|
212
201
|
beforeResult.successCallbacks.forEach((cb) => cb());
|
|
@@ -215,7 +204,7 @@ export async function update(
|
|
|
215
204
|
await this._log({
|
|
216
205
|
command: "update",
|
|
217
206
|
localParams,
|
|
218
|
-
data: { filter,
|
|
207
|
+
data: { filter, newData, params },
|
|
219
208
|
duration: Date.now() - start,
|
|
220
209
|
error: getErrorAsObject(e),
|
|
221
210
|
});
|
|
@@ -1,71 +1,49 @@
|
|
|
1
|
-
import type { AnyObject} from "prostgles-types";
|
|
1
|
+
import type { AnyObject } from "prostgles-types";
|
|
2
2
|
import { getJSONBObjectSchemaValidationError, omitKeys } from "prostgles-types";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { FileTableRow } from "../../FileManager/getFileTableConfig";
|
|
4
|
+
import type { FileTableConfig } from "../../ProstglesTypes";
|
|
5
|
+
import type { LocalParams } from "../DboBuilder";
|
|
5
6
|
import { isFile, uploadFile } from "../uploadFile";
|
|
6
7
|
import type { TableHandler } from "./TableHandler";
|
|
7
8
|
|
|
8
9
|
type Args = {
|
|
9
10
|
newData: AnyObject;
|
|
10
11
|
filter: AnyObject;
|
|
11
|
-
tableRules: ParsedTableRule | undefined;
|
|
12
12
|
localParams: LocalParams | undefined;
|
|
13
13
|
};
|
|
14
|
-
export const updateFile = async
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (tableRules && !tableRules.update) {
|
|
21
|
-
throw "Not allowed";
|
|
22
|
-
}
|
|
23
|
-
if (localParams?.testRule) {
|
|
24
|
-
return { newData: {} };
|
|
25
|
-
}
|
|
26
|
-
|
|
14
|
+
export const updateFile = async (
|
|
15
|
+
tableHandler: TableHandler,
|
|
16
|
+
config: FileTableConfig,
|
|
17
|
+
{ filter, newData, localParams }: Args,
|
|
18
|
+
): Promise<{ newData: AnyObject }> => {
|
|
27
19
|
const { data } = getJSONBObjectSchemaValidationError(
|
|
28
20
|
{ id: { optional: true, type: "string" } },
|
|
29
21
|
filter,
|
|
30
|
-
"filter"
|
|
22
|
+
"filter",
|
|
31
23
|
);
|
|
32
24
|
const existingMediaId = data?.id;
|
|
33
25
|
if (!existingMediaId) {
|
|
34
26
|
throw new Error(
|
|
35
|
-
`Updating the file table with file data can only be done by providing a single id filter. E.g. { id: "9ea4e23c-2b1a-4e33-8ec0-c15919bb45ec" }
|
|
27
|
+
`Updating the file table with file data can only be done by providing a single id filter. E.g. { id: "9ea4e23c-2b1a-4e33-8ec0-c15919bb45ec" } `,
|
|
36
28
|
);
|
|
37
29
|
}
|
|
38
30
|
if (!isFile(newData)) {
|
|
39
31
|
throw new Error(
|
|
40
|
-
"Expecting { data: Buffer, name: string } but received " + JSON.stringify(newData)
|
|
32
|
+
"Expecting { data: Buffer, name: string } but received " + JSON.stringify(newData),
|
|
41
33
|
);
|
|
42
34
|
}
|
|
43
35
|
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const validate: ValidateRowBasic | undefined =
|
|
48
|
-
rule?.validate ?
|
|
49
|
-
async (row) => {
|
|
50
|
-
return rule.validate!({
|
|
51
|
-
update: row,
|
|
52
|
-
filter,
|
|
53
|
-
dbx: this.tx?.dbTX || this.dboBuilder.dbo,
|
|
54
|
-
localParams: localParams!,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
: undefined;
|
|
58
|
-
|
|
59
|
-
const existingFile: Media | undefined = await (
|
|
60
|
-
(localParams?.tx?.dbTX[this.name]) || this
|
|
61
|
-
).findOne({ id: existingMediaId });
|
|
36
|
+
const existingFile = (await tableHandler.findOne({
|
|
37
|
+
id: existingMediaId,
|
|
38
|
+
})) as FileTableRow | undefined;
|
|
62
39
|
|
|
63
|
-
if (!existingFile?.name)
|
|
40
|
+
if (!existingFile?.name) {
|
|
41
|
+
throw new Error("Existing file record not found");
|
|
42
|
+
}
|
|
64
43
|
|
|
65
|
-
await
|
|
66
|
-
const newFile = await uploadFile
|
|
44
|
+
await config.storageClient.delete(existingFile.name);
|
|
45
|
+
const newFile = await uploadFile(config, {
|
|
67
46
|
row: newData,
|
|
68
|
-
validate,
|
|
69
47
|
localParams,
|
|
70
48
|
mediaId: existingFile.id,
|
|
71
49
|
});
|
|
@@ -29,7 +29,7 @@ import type { OnData } from "./subscribe";
|
|
|
29
29
|
import { subscribe } from "./subscribe";
|
|
30
30
|
import { validateViewRules } from "./validateViewRules";
|
|
31
31
|
import { escapeTSNames } from "../../utils/utils";
|
|
32
|
-
import type { TableDefinition } from "../../TableConfig/
|
|
32
|
+
import type { TableDefinition } from "../../TableConfig/TableConfigTypes";
|
|
33
33
|
import { getDbHandlerWithAbort } from "./getDbHandlerWithAbort";
|
|
34
34
|
import type { VoidFunction } from "../../SchemaWatch/SchemaWatch";
|
|
35
35
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TableInfo as TInfo } from "prostgles-types/dist";
|
|
2
2
|
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
3
3
|
import type { LocalParams } from "../DboBuilder";
|
|
4
4
|
import type { ViewHandler } from "./ViewHandler";
|
|
@@ -27,7 +27,7 @@ export async function getInfo(
|
|
|
27
27
|
tableName: this.name,
|
|
28
28
|
lang,
|
|
29
29
|
});
|
|
30
|
-
|
|
30
|
+
const tableInfo: TInfo = {
|
|
31
31
|
oid: this.tableOrViewInfo.oid,
|
|
32
32
|
comment: this.tableOrViewInfo.comment,
|
|
33
33
|
qualifiedNameParts: this.tableOrViewInfo.qualifiedNameParts,
|
|
@@ -69,4 +69,21 @@ export async function getInfo(
|
|
|
69
69
|
delete: validatedTableRules.delete && {},
|
|
70
70
|
},
|
|
71
71
|
};
|
|
72
|
+
|
|
73
|
+
const modifyClientSchema = this.dboBuilder.prostgles.opts.modifyClientSchema;
|
|
74
|
+
if (!modifyClientSchema) {
|
|
75
|
+
return tableInfo;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const modifiedTableSchema = await modifyClientSchema(
|
|
79
|
+
{
|
|
80
|
+
name: this.name,
|
|
81
|
+
...tableInfo,
|
|
82
|
+
columns: [],
|
|
83
|
+
},
|
|
84
|
+
localParams?.isRemoteRequest?.clientInfo,
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
const { columns, name, ...rest } = modifiedTableSchema;
|
|
88
|
+
return rest;
|
|
72
89
|
}
|