prostgles-server 4.2.343 → 4.2.345
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/AuthHandler.d.ts +3 -4
- package/dist/Auth/AuthHandler.d.ts.map +1 -1
- package/dist/Auth/AuthHandler.js +3 -11
- package/dist/Auth/AuthHandler.js.map +1 -1
- package/dist/Auth/AuthTypes.d.ts +8 -7
- package/dist/Auth/AuthTypes.d.ts.map +1 -1
- package/dist/Auth/AuthTypes.js.map +1 -1
- package/dist/Auth/endpoints/setCatchAllRequestHandler.d.ts +2 -2
- package/dist/Auth/endpoints/setCatchAllRequestHandler.d.ts.map +1 -1
- package/dist/Auth/endpoints/setCatchAllRequestHandler.js +4 -3
- package/dist/Auth/endpoints/setCatchAllRequestHandler.js.map +1 -1
- package/dist/Auth/endpoints/setLoginRequestHandler.d.ts +4 -3
- package/dist/Auth/endpoints/setLoginRequestHandler.d.ts.map +1 -1
- package/dist/Auth/endpoints/setLoginRequestHandler.js.map +1 -1
- package/dist/Auth/endpoints/setLogoutRequestHandler.d.ts +2 -2
- package/dist/Auth/endpoints/setLogoutRequestHandler.d.ts.map +1 -1
- package/dist/Auth/endpoints/setLogoutRequestHandler.js.map +1 -1
- package/dist/Auth/endpoints/setMagicLinkOrOTPRequestHandler.d.ts +3 -3
- package/dist/Auth/endpoints/setMagicLinkOrOTPRequestHandler.d.ts.map +1 -1
- package/dist/Auth/endpoints/setMagicLinkOrOTPRequestHandler.js.map +1 -1
- package/dist/Auth/endpoints/setOAuthRequestHandlers.d.ts +3 -3
- package/dist/Auth/endpoints/setOAuthRequestHandlers.d.ts.map +1 -1
- package/dist/Auth/endpoints/setOAuthRequestHandlers.js.map +1 -1
- package/dist/Auth/endpoints/setRegisterRequestHandler.d.ts +1 -1
- package/dist/Auth/endpoints/setRegisterRequestHandler.d.ts.map +1 -1
- package/dist/Auth/endpoints/setRegisterRequestHandler.js.map +1 -1
- package/dist/Auth/getClientAuth.d.ts +3 -3
- package/dist/Auth/getClientAuth.d.ts.map +1 -1
- package/dist/Auth/getClientAuth.js.map +1 -1
- package/dist/Auth/login.d.ts +4 -3
- package/dist/Auth/login.d.ts.map +1 -1
- package/dist/Auth/login.js.map +1 -1
- package/dist/Auth/sendEmail.d.ts +2 -2
- package/dist/Auth/sendEmail.d.ts.map +1 -1
- package/dist/Auth/setupAuthRoutes.d.ts +1 -1
- package/dist/Auth/setupAuthRoutes.d.ts.map +1 -1
- package/dist/Auth/setupAuthRoutes.js.map +1 -1
- package/dist/Auth/utils/getClientRequestIPsInfo.d.ts +2 -2
- package/dist/Auth/utils/getClientRequestIPsInfo.d.ts.map +1 -1
- package/dist/Auth/utils/getReturnUrl.d.ts +1 -1
- package/dist/Auth/utils/getReturnUrl.d.ts.map +1 -1
- package/dist/Auth/utils/getSidAndUserFromRequest.d.ts +2 -2
- package/dist/Auth/utils/getSidAndUserFromRequest.d.ts.map +1 -1
- package/dist/Auth/utils/handleGetUser.d.ts +1 -1
- package/dist/Auth/utils/handleGetUser.d.ts.map +1 -1
- package/dist/Auth/utils/handleGetUser.js.map +1 -1
- package/dist/Auth/utils/matchesRoute.d.ts +2 -0
- package/dist/Auth/utils/matchesRoute.d.ts.map +1 -0
- package/dist/Auth/utils/matchesRoute.js +13 -0
- package/dist/Auth/utils/matchesRoute.js.map +1 -0
- package/dist/Auth/utils/removeExpressRoute.d.ts +1 -1
- package/dist/Auth/utils/removeExpressRoute.d.ts.map +1 -1
- package/dist/Auth/utils/removeExpressRoute.js +2 -2
- package/dist/Auth/utils/removeExpressRoute.js.map +1 -1
- package/dist/Auth/utils/setCookieAndGoToReturnURLIFSet.d.ts.map +1 -1
- package/dist/Auth/utils/setCookieAndGoToReturnURLIFSet.js +2 -1
- package/dist/Auth/utils/setCookieAndGoToReturnURLIFSet.js.map +1 -1
- package/dist/Auth/utils/upsertNamedExpressMiddleware.d.ts +3 -1
- package/dist/Auth/utils/upsertNamedExpressMiddleware.d.ts.map +1 -1
- package/dist/Auth/utils/upsertNamedExpressMiddleware.js +14 -3
- package/dist/Auth/utils/upsertNamedExpressMiddleware.js.map +1 -1
- package/dist/DBEventsManager.d.ts +2 -2
- package/dist/DBEventsManager.d.ts.map +1 -1
- package/dist/DBEventsManager.js.map +1 -1
- package/dist/{DBSchemaBuilder.d.ts → DBSchemaBuilder/DBSchemaBuilder.d.ts} +9 -5
- package/dist/DBSchemaBuilder/DBSchemaBuilder.d.ts.map +1 -0
- package/dist/DBSchemaBuilder/DBSchemaBuilder.js +35 -0
- package/dist/DBSchemaBuilder/DBSchemaBuilder.js.map +1 -0
- package/dist/DBSchemaBuilder/DBSchemaBuilder.spec.d.ts +2 -0
- package/dist/DBSchemaBuilder/DBSchemaBuilder.spec.d.ts.map +1 -0
- package/dist/DBSchemaBuilder/DBSchemaBuilder.spec.js +98 -0
- package/dist/DBSchemaBuilder/DBSchemaBuilder.spec.js.map +1 -0
- package/dist/DBSchemaBuilder/getColumnTypescriptDefinition.d.ts +15 -0
- package/dist/DBSchemaBuilder/getColumnTypescriptDefinition.d.ts.map +1 -0
- package/dist/DBSchemaBuilder/getColumnTypescriptDefinition.js +79 -0
- package/dist/DBSchemaBuilder/getColumnTypescriptDefinition.js.map +1 -0
- package/dist/DboBuilder/DboBuilder.d.ts +9 -8
- package/dist/DboBuilder/DboBuilder.d.ts.map +1 -1
- package/dist/DboBuilder/DboBuilder.js +10 -6
- package/dist/DboBuilder/DboBuilder.js.map +1 -1
- package/dist/DboBuilder/DboBuilderTypes.d.ts +7 -7
- package/dist/DboBuilder/DboBuilderTypes.d.ts.map +1 -1
- package/dist/DboBuilder/QueryBuilder/Functions/COMPUTED_FIELDS.d.ts +3 -0
- package/dist/DboBuilder/QueryBuilder/Functions/COMPUTED_FIELDS.d.ts.map +1 -0
- package/dist/DboBuilder/QueryBuilder/Functions/COMPUTED_FIELDS.js +35 -0
- package/dist/DboBuilder/QueryBuilder/Functions/COMPUTED_FIELDS.js.map +1 -0
- package/dist/DboBuilder/QueryBuilder/{Functions.d.ts → Functions/Functions.d.ts} +1 -8
- package/dist/DboBuilder/QueryBuilder/Functions/Functions.d.ts.map +1 -0
- package/dist/DboBuilder/QueryBuilder/{Functions.js → Functions/Functions.js} +48 -123
- package/dist/DboBuilder/QueryBuilder/Functions/Functions.js.map +1 -0
- package/dist/DboBuilder/QueryBuilder/Functions/parseFunction.d.ts +8 -0
- package/dist/DboBuilder/QueryBuilder/Functions/parseFunction.d.ts.map +1 -0
- package/dist/DboBuilder/QueryBuilder/Functions/parseFunction.js +51 -0
- package/dist/DboBuilder/QueryBuilder/Functions/parseFunction.js.map +1 -0
- package/dist/DboBuilder/QueryBuilder/QueryBuilder.d.ts +5 -6
- package/dist/DboBuilder/QueryBuilder/QueryBuilder.d.ts.map +1 -1
- package/dist/DboBuilder/QueryBuilder/QueryBuilder.js +8 -14
- package/dist/DboBuilder/QueryBuilder/QueryBuilder.js.map +1 -1
- package/dist/DboBuilder/QueryBuilder/getJoinQuery.d.ts +3 -2
- package/dist/DboBuilder/QueryBuilder/getJoinQuery.d.ts.map +1 -1
- package/dist/DboBuilder/QueryBuilder/getJoinQuery.js +4 -4
- package/dist/DboBuilder/QueryBuilder/getJoinQuery.js.map +1 -1
- package/dist/DboBuilder/QueryBuilder/getNewQuery.d.ts +5 -5
- package/dist/DboBuilder/QueryBuilder/getNewQuery.d.ts.map +1 -1
- package/dist/DboBuilder/QueryBuilder/getNewQuery.js +3 -2
- package/dist/DboBuilder/QueryBuilder/getNewQuery.js.map +1 -1
- package/dist/DboBuilder/QueryBuilder/getSelectQuery.d.ts +2 -2
- package/dist/DboBuilder/QueryBuilder/getSelectQuery.d.ts.map +1 -1
- package/dist/DboBuilder/QueryStreamer.d.ts +6 -6
- package/dist/DboBuilder/QueryStreamer.d.ts.map +1 -1
- package/dist/DboBuilder/QueryStreamer.js.map +1 -1
- package/dist/DboBuilder/TableHandler/DataValidator.d.ts +5 -5
- package/dist/DboBuilder/TableHandler/DataValidator.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/DataValidator.js.map +1 -1
- package/dist/DboBuilder/TableHandler/TableHandler.d.ts +8 -7
- package/dist/DboBuilder/TableHandler/TableHandler.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/TableHandler.js +3 -2
- package/dist/DboBuilder/TableHandler/TableHandler.js.map +1 -1
- package/dist/DboBuilder/TableHandler/delete.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/delete.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/delete.js.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insert.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/insert/insert.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insert.js +0 -9
- package/dist/DboBuilder/TableHandler/insert/insert.js.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insertNestedRecords.d.ts +6 -5
- package/dist/DboBuilder/TableHandler/insert/insertNestedRecords.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/insert/insertNestedRecords.js.map +1 -1
- package/dist/DboBuilder/TableHandler/insertTest.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/insertTest.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/insertTest.js.map +1 -1
- package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.d.ts +3 -3
- package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/onDeleteFromFileTable.js.map +1 -1
- package/dist/DboBuilder/TableHandler/runInsertUpdateQuery.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/runInsertUpdateQuery.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/runInsertUpdateQuery.js.map +1 -1
- package/dist/DboBuilder/TableHandler/update.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/update.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/update.js.map +1 -1
- package/dist/DboBuilder/TableHandler/updateBatch.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/updateBatch.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/updateBatch.js.map +1 -1
- package/dist/DboBuilder/TableHandler/updateFile.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/updateFile.d.ts.map +1 -1
- package/dist/DboBuilder/TableHandler/updateFile.js.map +1 -1
- package/dist/DboBuilder/TableHandler/upsert.d.ts +4 -4
- package/dist/DboBuilder/TableHandler/upsert.d.ts.map +1 -1
- package/dist/DboBuilder/TableRules/getValidatedRules.d.ts.map +1 -1
- package/dist/DboBuilder/TableRules/getValidatedRules.js +4 -4
- package/dist/DboBuilder/TableRules/getValidatedRules.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/ViewHandler.d.ts +10 -10
- package/dist/DboBuilder/ViewHandler/ViewHandler.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/ViewHandler.js +2 -1
- package/dist/DboBuilder/ViewHandler/ViewHandler.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/count.d.ts +4 -4
- package/dist/DboBuilder/ViewHandler/count.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/find.d.ts +6 -6
- package/dist/DboBuilder/ViewHandler/find.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/find.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/getExistsCondition.d.ts +2 -2
- package/dist/DboBuilder/ViewHandler/getExistsCondition.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/getExistsCondition.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/getExistsFilters.d.ts +2 -2
- package/dist/DboBuilder/ViewHandler/getExistsFilters.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/getExistsFilters.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/getInfo.d.ts +4 -4
- package/dist/DboBuilder/ViewHandler/getInfo.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/getTableJoinQuery.d.ts +1 -1
- package/dist/DboBuilder/ViewHandler/getTableJoinQuery.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/parseComplexFilter.d.ts +2 -2
- package/dist/DboBuilder/ViewHandler/parseComplexFilter.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/parseComplexFilter.js +5 -3
- package/dist/DboBuilder/ViewHandler/parseComplexFilter.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/parseFieldFilter.d.ts +1 -1
- package/dist/DboBuilder/ViewHandler/parseFieldFilter.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/parseFieldFilter.js +10 -5
- package/dist/DboBuilder/ViewHandler/parseFieldFilter.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/parseJoinPath.d.ts +2 -2
- package/dist/DboBuilder/ViewHandler/parseJoinPath.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/parseJoinPath.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/prepareSortItems.d.ts +3 -3
- package/dist/DboBuilder/ViewHandler/prepareSortItems.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/prepareSortItems.js +2 -2
- package/dist/DboBuilder/ViewHandler/prepareSortItems.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/prepareWhere.d.ts +4 -4
- package/dist/DboBuilder/ViewHandler/prepareWhere.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/prepareWhere.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/size.d.ts +4 -4
- package/dist/DboBuilder/ViewHandler/size.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/subscribe.d.ts +4 -4
- package/dist/DboBuilder/ViewHandler/subscribe.d.ts.map +1 -1
- package/dist/DboBuilder/ViewHandler/subscribe.js.map +1 -1
- package/dist/DboBuilder/ViewHandler/validateViewRules.d.ts +3 -3
- package/dist/DboBuilder/ViewHandler/validateViewRules.d.ts.map +1 -1
- package/dist/DboBuilder/dboBuilderUtils.d.ts +6 -13
- package/dist/DboBuilder/dboBuilderUtils.d.ts.map +1 -1
- package/dist/DboBuilder/dboBuilderUtils.js +3 -33
- package/dist/DboBuilder/dboBuilderUtils.js.map +1 -1
- package/dist/DboBuilder/getColumns.d.ts +5 -5
- package/dist/DboBuilder/getColumns.d.ts.map +1 -1
- package/dist/DboBuilder/getColumns.js +1 -1
- package/dist/DboBuilder/getColumns.js.map +1 -1
- package/dist/DboBuilder/getCondition.d.ts +3 -3
- package/dist/DboBuilder/getCondition.d.ts.map +1 -1
- package/dist/DboBuilder/getCondition.js +1 -1
- package/dist/DboBuilder/getCondition.js.map +1 -1
- package/dist/DboBuilder/getSubscribeRelatedTables.d.ts +6 -6
- package/dist/DboBuilder/getSubscribeRelatedTables.d.ts.map +1 -1
- package/dist/DboBuilder/getSubscribeRelatedTables.js.map +1 -1
- package/dist/DboBuilder/parseUpdateRules.d.ts +5 -4
- package/dist/DboBuilder/parseUpdateRules.d.ts.map +1 -1
- package/dist/DboBuilder/parseUpdateRules.js.map +1 -1
- package/dist/DboBuilder/prepareShortestJoinPaths.d.ts +4 -4
- package/dist/DboBuilder/prepareShortestJoinPaths.d.ts.map +1 -1
- package/dist/DboBuilder/prepareShortestJoinPaths.js.map +1 -1
- package/dist/DboBuilder/runSQL.d.ts +5 -5
- package/dist/DboBuilder/runSQL.d.ts.map +1 -1
- package/dist/DboBuilder/runSQL.js +2 -1
- package/dist/DboBuilder/runSQL.js.map +1 -1
- package/dist/DboBuilder/schema/getMaterialViews.d.ts +2 -2
- package/dist/DboBuilder/schema/getMaterialViews.d.ts.map +1 -1
- package/dist/DboBuilder/schema/getTablesForSchemaPostgresSQL.d.ts +3 -3
- package/dist/DboBuilder/schema/getTablesForSchemaPostgresSQL.d.ts.map +1 -1
- package/dist/DboBuilder/schema/getTablesForSchemaPostgresSQL.js +1 -1
- package/dist/DboBuilder/schema/getTablesForSchemaPostgresSQL.js.map +1 -1
- package/dist/DboBuilder/uploadFile.d.ts +4 -4
- package/dist/DboBuilder/uploadFile.d.ts.map +1 -1
- package/dist/DboBuilder/uploadFile.js.map +1 -1
- package/dist/FileManager/FileManager.d.ts +3 -5
- package/dist/FileManager/FileManager.d.ts.map +1 -1
- package/dist/FileManager/FileManager.js +1 -13
- package/dist/FileManager/FileManager.js.map +1 -1
- package/dist/FileManager/getValidatedFileType.d.ts +2 -2
- package/dist/FileManager/getValidatedFileType.d.ts.map +1 -1
- package/dist/FileManager/getValidatedFileType.js.map +1 -1
- package/dist/FileManager/initFileManager.d.ts +2 -2
- package/dist/FileManager/initFileManager.d.ts.map +1 -1
- package/dist/FileManager/initFileManager.js.map +1 -1
- package/dist/FileManager/upload.d.ts +1 -1
- package/dist/FileManager/upload.d.ts.map +1 -1
- package/dist/FileManager/uploadStream.d.ts +1 -1
- package/dist/FileManager/uploadStream.d.ts.map +1 -1
- package/dist/Filtering.d.ts +1 -1
- package/dist/Filtering.d.ts.map +1 -1
- package/dist/Filtering.js.map +1 -1
- package/dist/Logging.d.ts +3 -3
- package/dist/Logging.d.ts.map +1 -1
- package/dist/PostgresNotifListenManager.d.ts +3 -3
- package/dist/PostgresNotifListenManager.d.ts.map +1 -1
- package/dist/Prostgles.d.ts +7 -6
- package/dist/Prostgles.d.ts.map +1 -1
- package/dist/Prostgles.js.map +1 -1
- package/dist/ProstglesTypes.d.ts +17 -16
- package/dist/ProstglesTypes.d.ts.map +1 -1
- package/dist/ProstglesTypes.js.map +1 -1
- package/dist/PubSubManager/PubSubManager.d.ts +8 -7
- package/dist/PubSubManager/PubSubManager.d.ts.map +1 -1
- package/dist/PubSubManager/PubSubManager.js.map +1 -1
- package/dist/PubSubManager/PubSubManagerUtils.d.ts +1 -1
- package/dist/PubSubManager/PubSubManagerUtils.d.ts.map +1 -1
- package/dist/PubSubManager/addSub.d.ts +3 -3
- package/dist/PubSubManager/addSub.d.ts.map +1 -1
- package/dist/PubSubManager/addSync.d.ts +1 -1
- package/dist/PubSubManager/addSync.d.ts.map +1 -1
- package/dist/PubSubManager/addTrigger.d.ts +3 -2
- package/dist/PubSubManager/addTrigger.d.ts.map +1 -1
- package/dist/PubSubManager/addTrigger.js.map +1 -1
- package/dist/PubSubManager/deleteOrphanedTriggers.d.ts +1 -1
- package/dist/PubSubManager/deleteOrphanedTriggers.d.ts.map +1 -1
- package/dist/PubSubManager/getCreatePubSubManagerError.d.ts +1 -1
- package/dist/PubSubManager/getCreatePubSubManagerError.d.ts.map +1 -1
- package/dist/PubSubManager/init/getPubSubManagerInitQuery.d.ts +1 -1
- package/dist/PubSubManager/init/getPubSubManagerInitQuery.d.ts.map +1 -1
- package/dist/PubSubManager/notifListener.d.ts +1 -1
- package/dist/PubSubManager/notifListener.d.ts.map +1 -1
- package/dist/PubSubManager/pushSubData.d.ts +2 -1
- package/dist/PubSubManager/pushSubData.d.ts.map +1 -1
- package/dist/PubSubManager/pushSubData.js.map +1 -1
- package/dist/PublishParser/PublishParser.d.ts +6 -5
- package/dist/PublishParser/PublishParser.d.ts.map +1 -1
- package/dist/PublishParser/PublishParser.js.map +1 -1
- package/dist/PublishParser/getFileTableRules.d.ts +3 -3
- package/dist/PublishParser/getFileTableRules.d.ts.map +1 -1
- package/dist/PublishParser/getFileTableRules.js.map +1 -1
- package/dist/PublishParser/getSchemaFromPublish.d.ts +4 -3
- package/dist/PublishParser/getSchemaFromPublish.d.ts.map +1 -1
- package/dist/PublishParser/getSchemaFromPublish.js.map +1 -1
- package/dist/PublishParser/getTableRulesWithoutFileTable.d.ts +4 -3
- package/dist/PublishParser/getTableRulesWithoutFileTable.d.ts.map +1 -1
- package/dist/PublishParser/getTableRulesWithoutFileTable.js.map +1 -1
- package/dist/PublishParser/publishTypesAndUtils.d.ts +7 -7
- package/dist/PublishParser/publishTypesAndUtils.d.ts.map +1 -1
- package/dist/PublishParser/publishTypesAndUtils.js.map +1 -1
- package/dist/RestApi.d.ts +4 -4
- package/dist/RestApi.d.ts.map +1 -1
- package/dist/SchemaWatch/SchemaWatch.d.ts +1 -1
- package/dist/SchemaWatch/SchemaWatch.d.ts.map +1 -1
- package/dist/SchemaWatch/SchemaWatch.js.map +1 -1
- package/dist/SchemaWatch/getValidatedWatchSchemaType.d.ts +1 -1
- package/dist/SchemaWatch/getValidatedWatchSchemaType.d.ts.map +1 -1
- package/dist/SchemaWatch/getWatchSchemaTagList.d.ts +1 -1
- package/dist/SchemaWatch/getWatchSchemaTagList.d.ts.map +1 -1
- package/dist/SyncReplication.d.ts +2 -2
- package/dist/SyncReplication.d.ts.map +1 -1
- package/dist/SyncReplication.js.map +1 -1
- package/dist/TableConfig/TableConfig.d.ts +5 -5
- package/dist/TableConfig/TableConfig.d.ts.map +1 -1
- package/dist/TableConfig/TableConfig.js.map +1 -1
- package/dist/TableConfig/getColumnConfig.d.ts +3 -0
- package/dist/TableConfig/getColumnConfig.d.ts.map +1 -0
- package/dist/TableConfig/getColumnConfig.js +12 -0
- package/dist/TableConfig/getColumnConfig.js.map +1 -0
- package/dist/TableConfig/getColumnDefinitionQuery.d.ts +3 -3
- package/dist/TableConfig/getColumnDefinitionQuery.d.ts.map +1 -1
- package/dist/TableConfig/getConstraintDefinitionQueries.d.ts +3 -3
- package/dist/TableConfig/getConstraintDefinitionQueries.d.ts.map +1 -1
- package/dist/TableConfig/getFutureTableSchema.d.ts +3 -3
- package/dist/TableConfig/getFutureTableSchema.d.ts.map +1 -1
- package/dist/TableConfig/getFutureTableSchema.js.map +1 -1
- package/dist/TableConfig/getPGIndexes.d.ts +1 -1
- package/dist/TableConfig/getPGIndexes.d.ts.map +1 -1
- package/dist/TableConfig/getTableColumnQueries.d.ts +2 -2
- package/dist/TableConfig/getTableColumnQueries.d.ts.map +1 -1
- package/dist/TableConfig/getTableConfigSchemaQueries.d.ts +1 -1
- package/dist/TableConfig/getTableConfigSchemaQueries.d.ts.map +1 -1
- package/dist/TableConfig/initTableConfig.d.ts +1 -1
- package/dist/TableConfig/initTableConfig.d.ts.map +1 -1
- package/dist/WebsocketAPI/getClientHandlers.d.ts +1 -1
- package/dist/WebsocketAPI/getClientHandlers.d.ts.map +1 -1
- package/dist/WebsocketAPI/getClientSchema.d.ts +1 -1
- package/dist/WebsocketAPI/getClientSchema.d.ts.map +1 -1
- package/dist/WebsocketAPI/onSocketConnected.d.ts +2 -2
- package/dist/WebsocketAPI/onSocketConnected.d.ts.map +1 -1
- package/dist/WebsocketAPI/onSocketConnected.js.map +1 -1
- package/dist/WebsocketAPI/pushSocketSchema.d.ts +1 -1
- package/dist/WebsocketAPI/pushSocketSchema.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/initProstgles.d.ts +6 -5
- package/dist/initProstgles.d.ts.map +1 -1
- package/dist/initProstgles.js +1 -1
- package/dist/initProstgles.js.map +1 -1
- package/dist/runClientRequest.d.ts +4 -3
- package/dist/runClientRequest.d.ts.map +1 -1
- package/dist/runClientRequest.js.map +1 -1
- package/dist/utils/asNameAlias.d.ts +2 -0
- package/dist/utils/asNameAlias.d.ts.map +1 -0
- package/dist/utils/asNameAlias.js +12 -0
- package/dist/utils/asNameAlias.js.map +1 -0
- package/dist/{utils.d.ts → utils/utils.d.ts} +1 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +34 -0
- package/dist/utils/utils.js.map +1 -0
- package/eslint.config.mjs +1 -0
- package/lib/Auth/AuthHandler.ts +6 -11
- package/lib/Auth/AuthTypes.ts +8 -7
- package/lib/Auth/endpoints/setCatchAllRequestHandler.ts +8 -5
- package/lib/Auth/endpoints/setLoginRequestHandler.ts +7 -4
- package/lib/Auth/endpoints/setLogoutRequestHandler.ts +5 -3
- package/lib/Auth/endpoints/setMagicLinkOrOTPRequestHandler.ts +8 -6
- package/lib/Auth/endpoints/setOAuthRequestHandlers.ts +6 -5
- package/lib/Auth/endpoints/setRegisterRequestHandler.ts +3 -2
- package/lib/Auth/getClientAuth.ts +8 -5
- package/lib/Auth/login.ts +6 -4
- package/lib/Auth/sendEmail.ts +2 -2
- package/lib/Auth/setupAuthRoutes.ts +3 -2
- package/lib/Auth/utils/getClientRequestIPsInfo.ts +2 -2
- package/lib/Auth/utils/getReturnUrl.ts +1 -1
- package/lib/Auth/utils/getSidAndUserFromRequest.ts +2 -2
- package/lib/Auth/utils/handleGetUser.ts +3 -2
- package/lib/Auth/utils/matchesRoute.ts +6 -0
- package/lib/Auth/utils/removeExpressRoute.ts +2 -2
- package/lib/Auth/utils/setCookieAndGoToReturnURLIFSet.ts +2 -7
- package/lib/Auth/utils/upsertNamedExpressMiddleware.ts +13 -2
- package/lib/DBEventsManager.ts +4 -3
- package/lib/DBSchemaBuilder/DBSchemaBuilder.spec.ts +128 -0
- package/lib/DBSchemaBuilder/DBSchemaBuilder.ts +100 -0
- package/lib/DBSchemaBuilder/getColumnTypescriptDefinition.ts +117 -0
- package/lib/DboBuilder/DboBuilder.ts +20 -15
- package/lib/DboBuilder/DboBuilderTypes.ts +7 -7
- package/lib/DboBuilder/QueryBuilder/Functions/COMPUTED_FIELDS.ts +35 -0
- package/lib/DboBuilder/QueryBuilder/{Functions.ts → Functions/Functions.ts} +7 -103
- package/lib/DboBuilder/QueryBuilder/Functions/parseFunction.ts +65 -0
- package/lib/DboBuilder/QueryBuilder/QueryBuilder.ts +9 -15
- package/lib/DboBuilder/QueryBuilder/getJoinQuery.ts +6 -9
- package/lib/DboBuilder/QueryBuilder/getNewQuery.ts +10 -10
- package/lib/DboBuilder/QueryBuilder/getSelectQuery.ts +2 -2
- package/lib/DboBuilder/QueryStreamer.ts +10 -9
- package/lib/DboBuilder/TableHandler/DataValidator.ts +8 -6
- package/lib/DboBuilder/TableHandler/TableHandler.ts +12 -16
- package/lib/DboBuilder/TableHandler/delete.ts +7 -6
- package/lib/DboBuilder/TableHandler/insert/insert.ts +6 -14
- package/lib/DboBuilder/TableHandler/insert/insertNestedRecords.ts +7 -6
- package/lib/DboBuilder/TableHandler/insertTest.ts +6 -4
- package/lib/DboBuilder/TableHandler/onDeleteFromFileTable.ts +5 -3
- package/lib/DboBuilder/TableHandler/runInsertUpdateQuery.ts +7 -4
- package/lib/DboBuilder/TableHandler/update.ts +6 -5
- package/lib/DboBuilder/TableHandler/updateBatch.ts +6 -5
- package/lib/DboBuilder/TableHandler/updateFile.ts +5 -4
- package/lib/DboBuilder/TableHandler/upsert.ts +4 -4
- package/lib/DboBuilder/TableRules/getValidatedRules.ts +4 -3
- package/lib/DboBuilder/ViewHandler/ViewHandler.ts +14 -20
- package/lib/DboBuilder/ViewHandler/count.ts +4 -4
- package/lib/DboBuilder/ViewHandler/find.ts +9 -7
- package/lib/DboBuilder/ViewHandler/getExistsCondition.ts +6 -5
- package/lib/DboBuilder/ViewHandler/getExistsFilters.ts +4 -3
- package/lib/DboBuilder/ViewHandler/getInfo.ts +4 -4
- package/lib/DboBuilder/ViewHandler/getTableJoinQuery.ts +1 -1
- package/lib/DboBuilder/ViewHandler/parseComplexFilter.ts +7 -4
- package/lib/DboBuilder/ViewHandler/parseFieldFilter.ts +19 -6
- package/lib/DboBuilder/ViewHandler/parseJoinPath.ts +4 -3
- package/lib/DboBuilder/ViewHandler/prepareSortItems.ts +4 -3
- package/lib/DboBuilder/ViewHandler/prepareWhere.ts +5 -4
- package/lib/DboBuilder/ViewHandler/size.ts +4 -4
- package/lib/DboBuilder/ViewHandler/subscribe.ts +8 -7
- package/lib/DboBuilder/ViewHandler/validateViewRules.ts +3 -3
- package/lib/DboBuilder/dboBuilderUtils.ts +9 -46
- package/lib/DboBuilder/getColumns.ts +9 -12
- package/lib/DboBuilder/getCondition.ts +6 -5
- package/lib/DboBuilder/getSubscribeRelatedTables.ts +11 -9
- package/lib/DboBuilder/parseUpdateRules.ts +7 -5
- package/lib/DboBuilder/prepareShortestJoinPaths.ts +7 -5
- package/lib/DboBuilder/runSQL.ts +10 -6
- package/lib/DboBuilder/schema/getMaterialViews.ts +2 -2
- package/lib/DboBuilder/schema/getTablesForSchemaPostgresSQL.ts +5 -5
- package/lib/DboBuilder/uploadFile.ts +5 -4
- package/lib/FileManager/FileManager.ts +6 -22
- package/lib/FileManager/getValidatedFileType.ts +4 -2
- package/lib/FileManager/initFileManager.ts +4 -3
- package/lib/FileManager/upload.ts +1 -1
- package/lib/FileManager/uploadStream.ts +1 -1
- package/lib/Filtering.ts +3 -2
- package/lib/Logging.ts +3 -3
- package/lib/PostgresNotifListenManager.ts +3 -3
- package/lib/Prostgles.ts +8 -6
- package/lib/ProstglesTypes.ts +20 -19
- package/lib/PubSubManager/PubSubManager.ts +11 -9
- package/lib/PubSubManager/PubSubManagerUtils.ts +1 -1
- package/lib/PubSubManager/addSub.ts +3 -3
- package/lib/PubSubManager/addSync.ts +1 -1
- package/lib/PubSubManager/addTrigger.ts +3 -2
- package/lib/PubSubManager/deleteOrphanedTriggers.ts +1 -1
- package/lib/PubSubManager/getCreatePubSubManagerError.ts +1 -1
- package/lib/PubSubManager/init/getPubSubManagerInitQuery.ts +1 -1
- package/lib/PubSubManager/notifListener.ts +1 -1
- package/lib/PubSubManager/pushSubData.ts +3 -2
- package/lib/PublishParser/PublishParser.ts +10 -8
- package/lib/PublishParser/getFileTableRules.ts +5 -4
- package/lib/PublishParser/getSchemaFromPublish.ts +8 -6
- package/lib/PublishParser/getTableRulesWithoutFileTable.ts +9 -8
- package/lib/PublishParser/publishTypesAndUtils.ts +11 -11
- package/lib/RestApi.ts +4 -4
- package/lib/SchemaWatch/SchemaWatch.ts +2 -1
- package/lib/SchemaWatch/getValidatedWatchSchemaType.ts +1 -1
- package/lib/SchemaWatch/getWatchSchemaTagList.ts +1 -1
- package/lib/SyncReplication.ts +4 -3
- package/lib/TableConfig/TableConfig.ts +8 -7
- package/lib/TableConfig/getColumnConfig.ts +13 -0
- package/lib/TableConfig/getColumnDefinitionQuery.ts +3 -3
- package/lib/TableConfig/getConstraintDefinitionQueries.ts +3 -3
- package/lib/TableConfig/getFutureTableSchema.ts +5 -3
- package/lib/TableConfig/getPGIndexes.ts +1 -1
- package/lib/TableConfig/getTableColumnQueries.ts +2 -2
- package/lib/TableConfig/getTableConfigSchemaQueries.ts +1 -1
- package/lib/TableConfig/initTableConfig.ts +1 -1
- package/lib/WebsocketAPI/getClientHandlers.ts +1 -1
- package/lib/WebsocketAPI/getClientSchema.ts +1 -1
- package/lib/WebsocketAPI/onSocketConnected.ts +4 -3
- package/lib/WebsocketAPI/pushSocketSchema.ts +1 -1
- package/lib/index.ts +2 -2
- package/lib/initProstgles.ts +8 -6
- package/lib/runClientRequest.ts +9 -7
- package/lib/typeTests/dboTypeCheck.ts +4 -4
- package/lib/utils/asNameAlias.ts +7 -0
- package/lib/utils/utils.ts +27 -0
- package/package.json +5 -3
- package/dist/DBSchemaBuilder.d.ts.map +0 -1
- package/dist/DBSchemaBuilder.js +0 -170
- package/dist/DBSchemaBuilder.js.map +0 -1
- package/dist/DboBuilder/QueryBuilder/Functions.d.ts.map +0 -1
- package/dist/DboBuilder/QueryBuilder/Functions.js.map +0 -1
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -19
- package/dist/utils.js.map +0 -1
- package/lib/DBSchemaBuilder.ts +0 -267
- package/lib/utils.ts +0 -14
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { COMPUTED_FIELDS } from "./COMPUTED_FIELDS";
|
|
2
|
+
import type { FunctionSpec } from "./Functions";
|
|
3
|
+
|
|
4
|
+
export const parseFunction = (funcData: {
|
|
5
|
+
func: string | FunctionSpec;
|
|
6
|
+
args: any[];
|
|
7
|
+
functions: FunctionSpec[];
|
|
8
|
+
allowedFields: string[];
|
|
9
|
+
}): FunctionSpec => {
|
|
10
|
+
const { func, args, functions, allowedFields } = funcData;
|
|
11
|
+
|
|
12
|
+
/* Function is computed column. No checks needed */
|
|
13
|
+
if (typeof func !== "string") {
|
|
14
|
+
const computedCol = COMPUTED_FIELDS.find((c) => c.name === func.name);
|
|
15
|
+
if (!computedCol)
|
|
16
|
+
throw `Unexpected function: computed column spec not found for ${JSON.stringify(func.name)}`;
|
|
17
|
+
return func;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const funcName = func;
|
|
21
|
+
const makeErr = (msg: string): string => {
|
|
22
|
+
return `Issue with function ${JSON.stringify({ [funcName]: args })}: \n${msg}`;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/* Find function */
|
|
26
|
+
const funcDef = functions.find((f) => f.name === funcName);
|
|
27
|
+
|
|
28
|
+
if (!funcDef) {
|
|
29
|
+
const sf = functions
|
|
30
|
+
.filter((f) => f.name.toLowerCase().slice(1).startsWith(funcName.toLowerCase()))
|
|
31
|
+
.sort((a, b) => a.name.length - b.name.length);
|
|
32
|
+
const hint =
|
|
33
|
+
sf.length ?
|
|
34
|
+
`. \n Maybe you meant: \n | ${sf.map((s) => s.name + " " + (s.description || "")).join(" \n | ")} ?`
|
|
35
|
+
: "";
|
|
36
|
+
throw "\n Function " + funcName + " does not exist or is not allowed " + hint;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Validate fields */
|
|
40
|
+
const fields = funcDef.getFields(args);
|
|
41
|
+
if (fields !== "*") {
|
|
42
|
+
fields.forEach((fieldKey) => {
|
|
43
|
+
if (typeof fieldKey !== "string" || !allowedFields.includes(fieldKey)) {
|
|
44
|
+
throw makeErr(
|
|
45
|
+
`getFields() => field name ${JSON.stringify(fieldKey)} is invalid or disallowed`
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
if ((funcDef.minCols ?? 0) > fields.length) {
|
|
50
|
+
throw makeErr(`Less columns provided than necessary (minCols=${funcDef.minCols})`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (
|
|
55
|
+
funcDef.numArgs &&
|
|
56
|
+
funcDef.minCols !== 0 &&
|
|
57
|
+
fields !== "*" &&
|
|
58
|
+
Array.isArray(fields) &&
|
|
59
|
+
!fields.length
|
|
60
|
+
) {
|
|
61
|
+
throw `\n Function "${funcDef.name}" expects at least a field name but has not been provided with one`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return funcDef;
|
|
65
|
+
};
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
asName,
|
|
6
|
+
import type {
|
|
8
7
|
ColumnInfo,
|
|
9
|
-
getKeys,
|
|
10
|
-
isEmpty,
|
|
11
|
-
isObject,
|
|
12
8
|
JoinSelect,
|
|
13
9
|
PG_COLUMN_UDT_DATA_TYPE,
|
|
14
10
|
Select,
|
|
15
11
|
ValidatedColumnInfo,
|
|
16
12
|
} from "prostgles-types";
|
|
17
|
-
import {
|
|
13
|
+
import { getKeys, isEmpty, isObject, postgresToTsType } from "prostgles-types";
|
|
14
|
+
import type { SortItem } from "../DboBuilder";
|
|
18
15
|
|
|
19
|
-
import { ParsedJoinPath } from "../ViewHandler/parseJoinPath";
|
|
20
|
-
import { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
21
|
-
import {
|
|
16
|
+
import type { ParsedJoinPath } from "../ViewHandler/parseJoinPath";
|
|
17
|
+
import type { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
18
|
+
import type { FieldSpec, FunctionSpec } from "./Functions/Functions";
|
|
19
|
+
import { COMPUTED_FIELDS } from "./Functions/COMPUTED_FIELDS";
|
|
20
|
+
import { parseFunction } from "./Functions/parseFunction";
|
|
21
|
+
import { asNameAlias } from "../../utils/asNameAlias";
|
|
22
22
|
|
|
23
23
|
export type SelectItem = {
|
|
24
24
|
getFields: (args: any[]) => string[] | "*";
|
|
@@ -73,12 +73,6 @@ export type NewQuery = NewQueryRoot & {
|
|
|
73
73
|
joins?: NewQueryJoin[];
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
export const asNameAlias = (field: string, tableAlias?: string) => {
|
|
77
|
-
const result = asName(field);
|
|
78
|
-
if (tableAlias) return asName(tableAlias) + "." + result;
|
|
79
|
-
return result;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
76
|
export const parseFunctionObject = (funcData: unknown): { funcName: string; args: any[] } => {
|
|
83
77
|
const makeErr = (msg: string) =>
|
|
84
78
|
`Function not specified correctly. Expecting { $funcName: ["columnName" | <value>, ...args] } object but got: ${JSON.stringify(funcData)} \n ${msg}`;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { isDefined, asName } from "prostgles-types";
|
|
2
|
-
import { ParsedJoinPath
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
SelectItem,
|
|
7
|
-
asNameAlias,
|
|
8
|
-
type SelectItemValidated,
|
|
9
|
-
} from "./QueryBuilder";
|
|
2
|
+
import type { ParsedJoinPath } from "../ViewHandler/parseJoinPath";
|
|
3
|
+
import { parseJoinPath } from "../ViewHandler/parseJoinPath";
|
|
4
|
+
import type { NewQuery, NewQueryJoin } from "./QueryBuilder";
|
|
5
|
+
import { type SelectItemValidated } from "./QueryBuilder";
|
|
10
6
|
import { ROOT_TABLE_ALIAS, ROOT_TABLE_ROW_NUM_ID, indentLines } from "./getSelectQuery";
|
|
11
|
-
import { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
7
|
+
import type { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
12
8
|
import { getJoinOnCondition } from "../ViewHandler/getTableJoinQuery";
|
|
13
9
|
import { prepareOrderByQuery } from "../DboBuilder";
|
|
10
|
+
import { asNameAlias } from "../../utils/asNameAlias";
|
|
14
11
|
|
|
15
12
|
type Args = {
|
|
16
13
|
q1: NewQuery;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
DetailedJoinSelect,
|
|
3
3
|
JoinPath,
|
|
4
4
|
JoinSelect,
|
|
5
5
|
RawJoinPath,
|
|
6
6
|
SelectParams,
|
|
7
7
|
SimpleJoinSelect,
|
|
8
|
-
getKeys,
|
|
9
|
-
isEmpty,
|
|
10
|
-
omitKeys,
|
|
11
8
|
} from "prostgles-types";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { getKeys, isEmpty, omitKeys } from "prostgles-types";
|
|
10
|
+
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
11
|
+
import type { Filter, LocalParams, ValidatedTableRules } from "../DboBuilder";
|
|
12
|
+
import type { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
15
13
|
import { parseJoinPath } from "../ViewHandler/parseJoinPath";
|
|
16
14
|
import { prepareSortItems } from "../ViewHandler/prepareSortItems";
|
|
17
|
-
import { PrepareWhereParams } from "../ViewHandler/prepareWhere";
|
|
18
|
-
import {
|
|
19
|
-
import { NewQuery, NewQueryJoin
|
|
15
|
+
import type { PrepareWhereParams } from "../ViewHandler/prepareWhere";
|
|
16
|
+
import { FUNCTIONS } from "./Functions/Functions";
|
|
17
|
+
import type { NewQuery, NewQueryJoin } from "./QueryBuilder";
|
|
18
|
+
import { SelectItemBuilder } from "./QueryBuilder";
|
|
19
|
+
import { COMPUTED_FIELDS } from "./Functions/COMPUTED_FIELDS";
|
|
20
20
|
|
|
21
21
|
const JOIN_KEYS = ["$innerJoin", "$leftJoin"] as const;
|
|
22
22
|
const JOIN_PARAM_KEYS = getKeys({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { prepareOrderByQuery } from "../DboBuilder";
|
|
2
2
|
import { isDefined, asName } from "prostgles-types";
|
|
3
|
-
import { NewQuery } from "./QueryBuilder";
|
|
4
|
-
import { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
3
|
+
import type { NewQuery } from "./QueryBuilder";
|
|
4
|
+
import type { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
5
5
|
import { getJoinQuery } from "./getJoinQuery";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import * as pg from "pg";
|
|
2
|
-
import CursorType from "pg-cursor";
|
|
3
|
-
import {
|
|
4
|
-
CHANNELS,
|
|
2
|
+
import type CursorType from "pg-cursor";
|
|
3
|
+
import type {
|
|
5
4
|
SQLOptions,
|
|
6
5
|
SocketSQLStreamPacket,
|
|
7
|
-
SocketSQLStreamServer
|
|
6
|
+
SocketSQLStreamServer} from "prostgles-types";
|
|
7
|
+
import {
|
|
8
|
+
CHANNELS,
|
|
8
9
|
omitKeys,
|
|
9
10
|
pickKeys,
|
|
10
11
|
} from "prostgles-types";
|
|
11
|
-
import { BasicCallback } from "../PubSubManager/PubSubManager";
|
|
12
|
-
import { VoidFunction } from "../SchemaWatch/SchemaWatch";
|
|
13
|
-
import { DB } from "../initProstgles";
|
|
14
|
-
import { DboBuilder } from "./DboBuilder";
|
|
15
|
-
import { PRGLIOSocket } from "./DboBuilderTypes";
|
|
12
|
+
import type { BasicCallback } from "../PubSubManager/PubSubManager";
|
|
13
|
+
import type { VoidFunction } from "../SchemaWatch/SchemaWatch";
|
|
14
|
+
import type { DB } from "../initProstgles";
|
|
15
|
+
import type { DboBuilder } from "./DboBuilder";
|
|
16
|
+
import type { PRGLIOSocket } from "./DboBuilderTypes";
|
|
16
17
|
import { getErrorAsObject, getSerializedClientErrorFromPGError } from "./dboBuilderUtils";
|
|
17
18
|
import { getDetailedFieldInfo } from "./runSQL";
|
|
18
19
|
const Cursor: typeof CursorType = require("pg-cursor");
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyObject,
|
|
3
|
-
FieldFilter
|
|
3
|
+
FieldFilter} from "prostgles-types/dist";
|
|
4
|
+
import {
|
|
4
5
|
asName,
|
|
5
6
|
getKeys,
|
|
6
7
|
isEmpty,
|
|
7
8
|
isObject,
|
|
8
9
|
pickKeys,
|
|
9
10
|
} from "prostgles-types/dist";
|
|
10
|
-
import { DBHandlerServer } from "../../Prostgles";
|
|
11
|
-
import { ValidateRowBasic } from "../../PublishParser/PublishParser";
|
|
11
|
+
import type { DBHandlerServer } from "../../Prostgles";
|
|
12
|
+
import type { ValidateRowBasic } from "../../PublishParser/PublishParser";
|
|
12
13
|
import { asValue } from "../../PubSubManager/PubSubManagerUtils";
|
|
13
|
-
import { LocalParams, TableSchemaColumn
|
|
14
|
+
import type { LocalParams, TableSchemaColumn} from "../DboBuilder";
|
|
15
|
+
import { pgp } from "../DboBuilder";
|
|
14
16
|
import { parseFunctionObject } from "../QueryBuilder/QueryBuilder";
|
|
15
17
|
import { validateObj } from "../ViewHandler/ViewHandler";
|
|
16
|
-
import { TableHandler, ValidatedParams } from "./TableHandler";
|
|
18
|
+
import type { TableHandler, ValidatedParams } from "./TableHandler";
|
|
17
19
|
|
|
18
20
|
type RowFieldDataPlain = {
|
|
19
21
|
type: "plain";
|
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
import pgPromise from "pg-promise";
|
|
2
|
-
import {
|
|
1
|
+
import type pgPromise from "pg-promise";
|
|
2
|
+
import type {
|
|
3
3
|
AnyObject,
|
|
4
|
-
asName,
|
|
5
4
|
DeleteParams,
|
|
6
5
|
FieldFilter,
|
|
7
6
|
InsertParams,
|
|
8
7
|
Select,
|
|
9
8
|
UpdateParams,
|
|
10
9
|
} from "prostgles-types";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
getErrorAsObject,
|
|
18
|
-
getSerializedClientErrorFromPGError,
|
|
19
|
-
LocalParams,
|
|
20
|
-
TableHandlers,
|
|
21
|
-
} from "../DboBuilder";
|
|
10
|
+
import { asName } from "prostgles-types";
|
|
11
|
+
import type { DB } from "../../Prostgles";
|
|
12
|
+
import type { SyncRule, ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
13
|
+
import type TableConfigurator from "../../TableConfig/TableConfig";
|
|
14
|
+
import type { DboBuilder, Filter, LocalParams, TableHandlers } from "../DboBuilder";
|
|
15
|
+
import { getErrorAsObject, getSerializedClientErrorFromPGError } from "../DboBuilder";
|
|
22
16
|
import type { TableSchema } from "../DboBuilderTypes";
|
|
23
17
|
import { parseUpdateRules } from "../parseUpdateRules";
|
|
24
|
-
import {
|
|
18
|
+
import { FUNCTIONS } from "../QueryBuilder/Functions/Functions";
|
|
25
19
|
import { SelectItemBuilder, type SelectItemValidated } from "../QueryBuilder/QueryBuilder";
|
|
26
|
-
import { JoinPaths
|
|
20
|
+
import type { JoinPaths } from "../ViewHandler/ViewHandler";
|
|
21
|
+
import { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
27
22
|
import { DataValidator } from "./DataValidator";
|
|
28
23
|
import { _delete } from "./delete";
|
|
29
24
|
import { insert } from "./insert/insert";
|
|
30
25
|
import { update } from "./update";
|
|
31
26
|
import { updateBatch } from "./updateBatch";
|
|
32
27
|
import { upsert } from "./upsert";
|
|
28
|
+
import { COMPUTED_FIELDS } from "../QueryBuilder/Functions/COMPUTED_FIELDS";
|
|
33
29
|
|
|
34
30
|
export type ValidatedParams = {
|
|
35
31
|
row: AnyObject;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import pgPromise from "pg-promise";
|
|
2
|
-
import { AnyObject, DeleteParams, FieldFilter } from "prostgles-types";
|
|
3
|
-
import { DeleteRule, ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
4
|
-
import {
|
|
1
|
+
import type pgPromise from "pg-promise";
|
|
2
|
+
import type { AnyObject, DeleteParams, FieldFilter } from "prostgles-types";
|
|
3
|
+
import type { DeleteRule, ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
4
|
+
import type {
|
|
5
5
|
Filter,
|
|
6
|
-
LocalParams
|
|
6
|
+
LocalParams} from "../DboBuilder";
|
|
7
|
+
import {
|
|
7
8
|
getErrorAsObject,
|
|
8
9
|
getSerializedClientErrorFromPGError,
|
|
9
10
|
withUserRLS,
|
|
10
11
|
} from "../DboBuilder";
|
|
11
12
|
import { runQueryReturnType } from "../ViewHandler/find";
|
|
12
|
-
import { TableHandler } from "./TableHandler";
|
|
13
|
+
import type { TableHandler } from "./TableHandler";
|
|
13
14
|
import { onDeleteFromFileTable } from "./onDeleteFromFileTable";
|
|
14
15
|
|
|
15
16
|
export async function _delete(
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AnyObject, InsertParams
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyObject, InsertParams } from "prostgles-types";
|
|
2
|
+
import { asName, getSerialisableError, isObject } from "prostgles-types";
|
|
3
|
+
import type { ParsedTableRule, ValidateRowBasic } from "../../../PublishParser/PublishParser";
|
|
4
|
+
import type { LocalParams } from "../../DboBuilder";
|
|
5
|
+
import { getSerializedClientErrorFromPGError, withUserRLS } from "../../DboBuilder";
|
|
4
6
|
import { prepareNewData } from "../DataValidator";
|
|
5
|
-
import { TableHandler } from "../TableHandler";
|
|
7
|
+
import type { TableHandler } from "../TableHandler";
|
|
6
8
|
import { insertTest } from "../insertTest";
|
|
7
9
|
import { runInsertUpdateQuery } from "../runInsertUpdateQuery";
|
|
8
10
|
import { insertNestedRecords } from "./insertNestedRecords";
|
|
@@ -272,13 +274,3 @@ const validateInsertParams = (params: InsertParams | undefined) => {
|
|
|
272
274
|
throw "Invalid params: " + bad_params.join(", ") + " \n Expecting: " + good_params.join(", ");
|
|
273
275
|
}
|
|
274
276
|
};
|
|
275
|
-
|
|
276
|
-
// const removeBuffers = (o: any) => {
|
|
277
|
-
// if(isPlainObject(o)){
|
|
278
|
-
// return JSON.stringify(getKeys(o).reduce((a, k) => {
|
|
279
|
-
// const value = o[k]
|
|
280
|
-
// return { ...a, [k]: Buffer.isBuffer(value)? `Buffer[${value.byteLength}][...REMOVED]` : value
|
|
281
|
-
// }
|
|
282
|
-
// }, {}));
|
|
283
|
-
// }
|
|
284
|
-
// }
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyObject,
|
|
3
|
+
InsertParams} from "prostgles-types";
|
|
4
|
+
import {
|
|
3
5
|
getKeys,
|
|
4
6
|
getPossibleNestedInsert,
|
|
5
|
-
InsertParams,
|
|
6
7
|
isDefined,
|
|
7
8
|
isObject,
|
|
8
9
|
omitKeys,
|
|
9
10
|
type ColumnInfo,
|
|
10
11
|
} from "prostgles-types";
|
|
11
|
-
import { LocalParams, TableHandlers } from "../../DboBuilder";
|
|
12
|
-
import { ParsedTableRule } from "../../../PublishParser/PublishParser";
|
|
13
|
-
import { TableHandler } from "../TableHandler";
|
|
14
|
-
import { AuthClientRequest } from "../../../Auth/AuthTypes";
|
|
12
|
+
import type { LocalParams, TableHandlers } from "../../DboBuilder";
|
|
13
|
+
import type { ParsedTableRule } from "../../../PublishParser/PublishParser";
|
|
14
|
+
import type { TableHandler } from "../TableHandler";
|
|
15
|
+
import type { AuthClientRequest } from "../../../Auth/AuthTypes";
|
|
15
16
|
|
|
16
17
|
type InsertNestedRecordsArgs = {
|
|
17
18
|
data: AnyObject | AnyObject[];
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AnyObject,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyObject, FieldFilter, FullFilter } from "prostgles-types";
|
|
2
|
+
import { asName } from "prostgles-types";
|
|
3
|
+
import type { LocalParams} from "../DboBuilder";
|
|
4
|
+
import { pgp } from "../DboBuilder";
|
|
5
|
+
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
4
6
|
import { asValue } from "../../PubSubManager/PubSubManagerUtils";
|
|
5
|
-
import { TableHandler } from "./TableHandler";
|
|
7
|
+
import type { TableHandler } from "./TableHandler";
|
|
6
8
|
|
|
7
9
|
type InsertTestArgs = {
|
|
8
10
|
tableRules: ParsedTableRule | undefined;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { AnyObject
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyObject} from "prostgles-types";
|
|
2
|
+
import { asName, pickKeys } from "prostgles-types";
|
|
3
|
+
import type { LocalParams} from "../DboBuilder";
|
|
4
|
+
import { type Media } from "../DboBuilder";
|
|
5
|
+
import type { TableHandler } from "./TableHandler";
|
|
4
6
|
|
|
5
7
|
type OnDeleteFromFileTableArgs = {
|
|
6
8
|
localParams: LocalParams | undefined;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { AnyObject,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { AnyObject, FieldFilter, InsertParams, UpdateParams } from "prostgles-types";
|
|
2
|
+
import { asName } from "prostgles-types";
|
|
3
|
+
import type { InsertRule, UpdateRule } from "../../PublishParser/PublishParser";
|
|
4
|
+
import type { LocalParams} from "../DboBuilder";
|
|
5
|
+
import { getClientErrorFromPGError, withUserRLS } from "../DboBuilder";
|
|
6
|
+
import type { TableHandler } from "./TableHandler";
|
|
7
|
+
import { getSelectItemQuery } from "./TableHandler";
|
|
5
8
|
|
|
6
9
|
type RunInsertUpdateQueryArgs = {
|
|
7
10
|
tableHandler: TableHandler;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AnyObject, UpdateParams } from "prostgles-types";
|
|
2
|
-
import { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyObject, UpdateParams } from "prostgles-types";
|
|
2
|
+
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
3
|
+
import type {
|
|
4
4
|
Filter,
|
|
5
|
-
LocalParams
|
|
5
|
+
LocalParams} from "../DboBuilder";
|
|
6
|
+
import {
|
|
6
7
|
getErrorAsObject,
|
|
7
8
|
getSerializedClientErrorFromPGError,
|
|
8
9
|
withUserRLS,
|
|
@@ -10,7 +11,7 @@ import {
|
|
|
10
11
|
import { prepareNewData } from "./DataValidator";
|
|
11
12
|
import { getInsertTableRules, getReferenceColumnInserts } from "./insert/insertNestedRecords";
|
|
12
13
|
import { runInsertUpdateQuery } from "./runInsertUpdateQuery";
|
|
13
|
-
import { TableHandler } from "./TableHandler";
|
|
14
|
+
import type { TableHandler } from "./TableHandler";
|
|
14
15
|
import { updateFile } from "./updateFile";
|
|
15
16
|
|
|
16
17
|
export async function update(
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { AnyObject, UpdateParams } from "prostgles-types";
|
|
2
|
-
import { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyObject, UpdateParams } from "prostgles-types";
|
|
2
|
+
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
3
|
+
import type {
|
|
4
4
|
Filter,
|
|
5
|
-
LocalParams
|
|
5
|
+
LocalParams} from "../DboBuilder";
|
|
6
|
+
import {
|
|
6
7
|
getClientErrorFromPGError,
|
|
7
8
|
getErrorAsObject,
|
|
8
9
|
getSerializedClientErrorFromPGError,
|
|
9
10
|
withUserRLS,
|
|
10
11
|
} from "../DboBuilder";
|
|
11
|
-
import { TableHandler } from "./TableHandler";
|
|
12
|
+
import type { TableHandler } from "./TableHandler";
|
|
12
13
|
|
|
13
14
|
export async function updateBatch(
|
|
14
15
|
this: TableHandler,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AnyObject
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AnyObject} from "prostgles-types";
|
|
2
|
+
import { getJSONBObjectSchemaValidationError, omitKeys } from "prostgles-types";
|
|
3
|
+
import type { ParsedTableRule, ValidateRowBasic } from "../../PublishParser/PublishParser";
|
|
4
|
+
import type { LocalParams, Media } from "../DboBuilder";
|
|
4
5
|
import { isFile, uploadFile } from "../uploadFile";
|
|
5
|
-
import { TableHandler } from "./TableHandler";
|
|
6
|
+
import type { TableHandler } from "./TableHandler";
|
|
6
7
|
|
|
7
8
|
type Args = {
|
|
8
9
|
newData: AnyObject;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AnyObject, UpdateParams } from "prostgles-types";
|
|
2
|
-
import { ParsedTableRule } from "../../PublishParser/publishTypesAndUtils";
|
|
3
|
-
import { Filter, LocalParams } from "../DboBuilderTypes";
|
|
1
|
+
import type { AnyObject, UpdateParams } from "prostgles-types";
|
|
2
|
+
import type { ParsedTableRule } from "../../PublishParser/publishTypesAndUtils";
|
|
3
|
+
import type { Filter, LocalParams } from "../DboBuilderTypes";
|
|
4
4
|
import { getErrorAsObject, getSerializedClientErrorFromPGError } from "../dboBuilderUtils";
|
|
5
|
-
import { TableHandler } from "./TableHandler";
|
|
5
|
+
import type { TableHandler } from "./TableHandler";
|
|
6
6
|
|
|
7
7
|
export const upsert = async function (
|
|
8
8
|
this: TableHandler,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { isEmpty, type FieldFilter } from "prostgles-types";
|
|
2
|
-
import type { ParsedTableRule
|
|
2
|
+
import type { ParsedTableRule } from "../../PublishParser/publishTypesAndUtils";
|
|
3
3
|
import type { LocalParams, ValidatedTableRules } from "../DboBuilderTypes";
|
|
4
|
-
import {
|
|
5
|
-
import { asNameAlias } from "../QueryBuilder/QueryBuilder";
|
|
4
|
+
import type { FieldSpec } from "../QueryBuilder/Functions/Functions";
|
|
6
5
|
import type { ViewHandler } from "../ViewHandler/ViewHandler";
|
|
6
|
+
import { COMPUTED_FIELDS } from "../QueryBuilder/Functions/COMPUTED_FIELDS";
|
|
7
|
+
import { asNameAlias } from "../../utils/asNameAlias";
|
|
7
8
|
|
|
8
9
|
export function getValidatedRules(
|
|
9
10
|
this: ViewHandler,
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import * as pgPromise from "pg-promise";
|
|
2
|
-
import {
|
|
1
|
+
import type * as pgPromise from "pg-promise";
|
|
2
|
+
import type {
|
|
3
3
|
AnyObject,
|
|
4
4
|
ColumnInfo,
|
|
5
5
|
FieldFilter,
|
|
6
6
|
SelectParams,
|
|
7
7
|
SubscribeParams,
|
|
8
|
-
asName,
|
|
9
|
-
isObject,
|
|
10
8
|
} from "prostgles-types";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
TableHandlers,
|
|
21
|
-
escapeTSNames,
|
|
22
|
-
getSerializedClientErrorFromPGError,
|
|
23
|
-
postgresToTsType,
|
|
24
|
-
} from "../DboBuilder";
|
|
25
|
-
import { TableSchema } from "../DboBuilderTypes";
|
|
9
|
+
import { asName, isObject, postgresToTsType } from "prostgles-types";
|
|
10
|
+
import type { TableEvent } from "../../Logging";
|
|
11
|
+
import type { DB } from "../../Prostgles";
|
|
12
|
+
import type { Join } from "../../ProstglesTypes";
|
|
13
|
+
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
14
|
+
import type { Graph } from "../../shortestPath";
|
|
15
|
+
import type { DboBuilder, Filter, LocalParams, TableHandlers } from "../DboBuilder";
|
|
16
|
+
import { getSerializedClientErrorFromPGError } from "../DboBuilder";
|
|
17
|
+
import type { TableSchema } from "../DboBuilderTypes";
|
|
26
18
|
import { getValidatedRules } from "../TableRules/getValidatedRules";
|
|
27
19
|
import { getColumns } from "../getColumns";
|
|
28
20
|
import { count } from "./count";
|
|
@@ -31,8 +23,10 @@ import { getInfo } from "./getInfo";
|
|
|
31
23
|
import { parseFieldFilter } from "./parseFieldFilter";
|
|
32
24
|
import { prepareWhere } from "./prepareWhere";
|
|
33
25
|
import { size } from "./size";
|
|
34
|
-
import { LocalFuncs
|
|
26
|
+
import type { LocalFuncs } from "./subscribe";
|
|
27
|
+
import { subscribe } from "./subscribe";
|
|
35
28
|
import { validateViewRules } from "./validateViewRules";
|
|
29
|
+
import { escapeTSNames } from "../../utils/utils";
|
|
36
30
|
|
|
37
31
|
export type JoinPaths = {
|
|
38
32
|
t1: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { SelectParams } from "prostgles-types";
|
|
2
|
-
import { ParsedTableRule } from "../../PublishParser/publishTypesAndUtils";
|
|
3
|
-
import { Filter, LocalParams } from "../DboBuilder";
|
|
1
|
+
import type { SelectParams } from "prostgles-types";
|
|
2
|
+
import type { ParsedTableRule } from "../../PublishParser/publishTypesAndUtils";
|
|
3
|
+
import type { Filter, LocalParams } from "../DboBuilder";
|
|
4
4
|
import {
|
|
5
5
|
getErrorAsObject,
|
|
6
6
|
getSerializedClientErrorFromPGError,
|
|
7
7
|
withUserRLS,
|
|
8
8
|
} from "../dboBuilderUtils";
|
|
9
|
-
import { ViewHandler } from "./ViewHandler";
|
|
9
|
+
import type { ViewHandler } from "./ViewHandler";
|
|
10
10
|
|
|
11
11
|
export async function count(
|
|
12
12
|
this: ViewHandler,
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { SelectParams
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { SelectParams} from "prostgles-types";
|
|
2
|
+
import { isObject } from "prostgles-types";
|
|
3
|
+
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
4
|
+
import type {
|
|
4
5
|
Filter,
|
|
5
|
-
LocalParams
|
|
6
|
+
LocalParams} from "../DboBuilder";
|
|
7
|
+
import {
|
|
6
8
|
getClientErrorFromPGError,
|
|
7
9
|
getErrorAsObject,
|
|
8
10
|
getSerializedClientErrorFromPGError,
|
|
@@ -10,10 +12,10 @@ import {
|
|
|
10
12
|
} from "../DboBuilder";
|
|
11
13
|
import { getNewQuery } from "../QueryBuilder/getNewQuery";
|
|
12
14
|
import { getSelectQuery } from "../QueryBuilder/getSelectQuery";
|
|
13
|
-
import { NewQuery } from "../QueryBuilder/QueryBuilder";
|
|
15
|
+
import type { NewQuery } from "../QueryBuilder/QueryBuilder";
|
|
14
16
|
import { canRunSQL } from "../runSQL";
|
|
15
|
-
import { TableHandler } from "../TableHandler/TableHandler";
|
|
16
|
-
import { ViewHandler } from "./ViewHandler";
|
|
17
|
+
import type { TableHandler } from "../TableHandler/TableHandler";
|
|
18
|
+
import type { ViewHandler } from "./ViewHandler";
|
|
17
19
|
|
|
18
20
|
export const find = async function (
|
|
19
21
|
this: ViewHandler,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { AnyObject, EXISTS_KEY,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import type { AnyObject, EXISTS_KEY, FieldFilter} from "prostgles-types";
|
|
2
|
+
import { EXISTS_KEYS, asName } from "prostgles-types";
|
|
3
|
+
import type { LocalParams, ExistsFilterConfig } from "../DboBuilder";
|
|
4
|
+
import type { ViewHandler } from "./ViewHandler";
|
|
5
|
+
import type { ParsedTableRule } from "../../PublishParser/PublishParser";
|
|
6
|
+
import type { TableHandler } from "../TableHandler/TableHandler";
|
|
6
7
|
import { getTableJoinQuery } from "./getTableJoinQuery";
|
|
7
8
|
|
|
8
9
|
export async function getExistsCondition(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { EXISTS_KEY
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { EXISTS_KEY} from "prostgles-types";
|
|
2
|
+
import { EXISTS_KEYS, getKeys } from "prostgles-types";
|
|
3
|
+
import type { ExistsFilterConfig } from "../DboBuilder";
|
|
4
|
+
import type { ViewHandler } from "./ViewHandler";
|
|
4
5
|
import { parseJoinPath } from "./parseJoinPath";
|
|
5
6
|
|
|
6
7
|
export const getExistsFilters = (
|