joist-core 2.3.0-next.8 → 2.3.0-next.80
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/build/AliasAssigner.cjs +36 -0
- package/build/AliasAssigner.cjs.map +1 -0
- package/build/AliasAssigner.d.cts +13 -0
- package/build/AliasAssigner.d.cts.map +1 -0
- package/build/AliasAssigner.d.mts +13 -0
- package/build/AliasAssigner.d.mts.map +1 -0
- package/build/AliasAssigner.js +34 -38
- package/build/AliasAssigner.js.map +1 -1
- package/build/Aliases.cjs +306 -0
- package/build/Aliases.cjs.map +1 -0
- package/build/Aliases.d.cts +122 -0
- package/build/Aliases.d.cts.map +1 -0
- package/build/Aliases.d.mts +122 -0
- package/build/Aliases.d.mts.map +1 -0
- package/build/Aliases.js +283 -442
- package/build/Aliases.js.map +1 -1
- package/build/BaseEntity.cjs +112 -0
- package/build/BaseEntity.cjs.map +1 -0
- package/build/BaseEntity.d.cts +73 -0
- package/build/BaseEntity.d.cts.map +1 -0
- package/build/BaseEntity.d.mts +73 -0
- package/build/BaseEntity.d.mts.map +1 -0
- package/build/BaseEntity.js +99 -110
- package/build/BaseEntity.js.map +1 -1
- package/build/ConditionBuilder.cjs +107 -0
- package/build/ConditionBuilder.cjs.map +1 -0
- package/build/ConditionBuilder.d.cts +31 -0
- package/build/ConditionBuilder.d.cts.map +1 -0
- package/build/ConditionBuilder.d.mts +31 -0
- package/build/ConditionBuilder.d.mts.map +1 -0
- package/build/ConditionBuilder.js +101 -107
- package/build/ConditionBuilder.js.map +1 -1
- package/build/DeferredAlias.cjs +28 -0
- package/build/DeferredAlias.cjs.map +1 -0
- package/build/DeferredAlias.d.cts +22 -0
- package/build/DeferredAlias.d.cts.map +1 -0
- package/build/DeferredAlias.d.mts +22 -0
- package/build/DeferredAlias.d.mts.map +1 -0
- package/build/DeferredAlias.js +25 -0
- package/build/DeferredAlias.js.map +1 -0
- package/build/Entity.cjs +12 -0
- package/build/Entity.cjs.map +1 -0
- package/build/Entity.d.cts +42 -0
- package/build/Entity.d.cts.map +1 -0
- package/build/Entity.d.mts +42 -0
- package/build/Entity.d.mts.map +1 -0
- package/build/Entity.js +8 -5
- package/build/Entity.js.map +1 -1
- package/build/EntityFields.cjs +1 -0
- package/build/EntityFields.d.cts +36 -0
- package/build/EntityFields.d.cts.map +1 -0
- package/build/EntityFields.d.mts +36 -0
- package/build/EntityFields.d.mts.map +1 -0
- package/build/EntityFields.js +1 -3
- package/build/EntityFilter.cjs +32 -0
- package/build/EntityFilter.cjs.map +1 -0
- package/build/EntityFilter.d.cts +127 -0
- package/build/EntityFilter.d.cts.map +1 -0
- package/build/EntityFilter.d.mts +127 -0
- package/build/EntityFilter.d.mts.map +1 -0
- package/build/EntityFilter.js +27 -17
- package/build/EntityFilter.js.map +1 -1
- package/build/EntityGraphQLFilter.cjs +56 -0
- package/build/EntityGraphQLFilter.cjs.map +1 -0
- package/build/EntityGraphQLFilter.d.cts +59 -0
- package/build/EntityGraphQLFilter.d.cts.map +1 -0
- package/build/EntityGraphQLFilter.d.mts +59 -0
- package/build/EntityGraphQLFilter.d.mts.map +1 -0
- package/build/EntityGraphQLFilter.js +51 -50
- package/build/EntityGraphQLFilter.js.map +1 -1
- package/build/EntityManager.cjs +1939 -0
- package/build/EntityManager.cjs.map +1 -0
- package/build/EntityManager.d.cts +834 -0
- package/build/EntityManager.d.cts.map +1 -0
- package/build/EntityManager.d.mts +834 -0
- package/build/EntityManager.d.mts.map +1 -0
- package/build/EntityManager.js +1816 -2223
- package/build/EntityManager.js.map +1 -1
- package/build/EntityMetadata.cjs +77 -0
- package/build/EntityMetadata.cjs.map +1 -0
- package/build/EntityMetadata.d.cts +262 -0
- package/build/EntityMetadata.d.cts.map +1 -0
- package/build/EntityMetadata.d.mts +262 -0
- package/build/EntityMetadata.d.mts.map +1 -0
- package/build/EntityMetadata.js +33 -48
- package/build/EntityMetadata.js.map +1 -1
- package/build/EnumMetadata.cjs +1 -0
- package/build/EnumMetadata.d.cts +18 -0
- package/build/EnumMetadata.d.cts.map +1 -0
- package/build/EnumMetadata.d.mts +18 -0
- package/build/EnumMetadata.d.mts.map +1 -0
- package/build/EnumMetadata.js +1 -3
- package/build/Expr.cjs +475 -0
- package/build/Expr.cjs.map +1 -0
- package/build/Expr.d.cts +258 -0
- package/build/Expr.d.cts.map +1 -0
- package/build/Expr.d.mts +258 -0
- package/build/Expr.d.mts.map +1 -0
- package/build/Expr.js +460 -0
- package/build/Expr.js.map +1 -0
- package/build/FlushLock.cjs +51 -0
- package/build/FlushLock.cjs.map +1 -0
- package/build/FlushLock.d.cts +29 -0
- package/build/FlushLock.d.cts.map +1 -0
- package/build/FlushLock.d.mts +29 -0
- package/build/FlushLock.d.mts.map +1 -0
- package/build/FlushLock.js +48 -54
- package/build/FlushLock.js.map +1 -1
- package/build/HintTree.cjs +70 -0
- package/build/HintTree.cjs.map +1 -0
- package/build/HintTree.d.cts +45 -0
- package/build/HintTree.d.cts.map +1 -0
- package/build/HintTree.d.mts +45 -0
- package/build/HintTree.d.mts.map +1 -0
- package/build/HintTree.js +63 -58
- package/build/HintTree.js.map +1 -1
- package/build/IndexManager.cjs +176 -0
- package/build/IndexManager.cjs.map +1 -0
- package/build/IndexManager.d.cts +36 -0
- package/build/IndexManager.d.cts.map +1 -0
- package/build/IndexManager.d.mts +36 -0
- package/build/IndexManager.d.mts.map +1 -0
- package/build/IndexManager.js +167 -218
- package/build/IndexManager.js.map +1 -1
- package/build/InstanceData.cjs +218 -0
- package/build/InstanceData.cjs.map +1 -0
- package/build/InstanceData.d.cts +98 -0
- package/build/InstanceData.d.cts.map +1 -0
- package/build/InstanceData.d.mts +98 -0
- package/build/InstanceData.d.mts.map +1 -0
- package/build/InstanceData.js +215 -222
- package/build/InstanceData.js.map +1 -1
- package/build/IsLoadedCache.cjs +59 -0
- package/build/IsLoadedCache.cjs.map +1 -0
- package/build/IsLoadedCache.d.cts +35 -0
- package/build/IsLoadedCache.d.cts.map +1 -0
- package/build/IsLoadedCache.d.mts +35 -0
- package/build/IsLoadedCache.d.mts.map +1 -0
- package/build/IsLoadedCache.js +57 -90
- package/build/IsLoadedCache.js.map +1 -1
- package/build/JoinRows.cjs +266 -0
- package/build/JoinRows.cjs.map +1 -0
- package/build/JoinRows.d.cts +120 -0
- package/build/JoinRows.d.cts.map +1 -0
- package/build/JoinRows.d.mts +120 -0
- package/build/JoinRows.d.mts.map +1 -0
- package/build/JoinRows.js +257 -313
- package/build/JoinRows.js.map +1 -1
- package/build/PendingChanges.cjs +2 -0
- package/build/PendingChanges.d.cts +29 -0
- package/build/PendingChanges.d.cts.map +1 -0
- package/build/PendingChanges.d.mts +29 -0
- package/build/PendingChanges.d.mts.map +1 -0
- package/build/PendingChanges.js +2 -3
- package/build/PluginManager.cjs +91 -0
- package/build/PluginManager.cjs.map +1 -0
- package/build/PluginManager.d.cts +112 -0
- package/build/PluginManager.d.cts.map +1 -0
- package/build/PluginManager.d.mts +112 -0
- package/build/PluginManager.d.mts.map +1 -0
- package/build/PluginManager.js +82 -106
- package/build/PluginManager.js.map +1 -1
- package/build/QueryParser.cjs +842 -0
- package/build/QueryParser.cjs.map +1 -0
- package/build/QueryParser.collectionJoins.cjs +353 -0
- package/build/QueryParser.collectionJoins.cjs.map +1 -0
- package/build/QueryParser.collectionJoins.d.cts +30 -0
- package/build/QueryParser.collectionJoins.d.cts.map +1 -0
- package/build/QueryParser.collectionJoins.d.mts +30 -0
- package/build/QueryParser.collectionJoins.d.mts.map +1 -0
- package/build/QueryParser.collectionJoins.js +258 -372
- package/build/QueryParser.collectionJoins.js.map +1 -1
- package/build/QueryParser.d.cts +346 -0
- package/build/QueryParser.d.cts.map +1 -0
- package/build/QueryParser.d.mts +346 -0
- package/build/QueryParser.d.mts.map +1 -0
- package/build/QueryParser.js +777 -915
- package/build/QueryParser.js.map +1 -1
- package/build/QueryParser.pruning.cjs +129 -0
- package/build/QueryParser.pruning.cjs.map +1 -0
- package/build/QueryParser.pruning.d.cts +10 -0
- package/build/QueryParser.pruning.d.cts.map +1 -0
- package/build/QueryParser.pruning.d.mts +10 -0
- package/build/QueryParser.pruning.d.mts.map +1 -0
- package/build/QueryParser.pruning.js +104 -173
- package/build/QueryParser.pruning.js.map +1 -1
- package/build/QueryVisitor.cjs +61 -0
- package/build/QueryVisitor.cjs.map +1 -0
- package/build/QueryVisitor.d.cts +21 -0
- package/build/QueryVisitor.d.cts.map +1 -0
- package/build/QueryVisitor.d.mts +21 -0
- package/build/QueryVisitor.d.mts.map +1 -0
- package/build/QueryVisitor.js +50 -97
- package/build/QueryVisitor.js.map +1 -1
- package/build/ReactionsManager.cjs +266 -0
- package/build/ReactionsManager.cjs.map +1 -0
- package/build/ReactionsManager.d.cts +99 -0
- package/build/ReactionsManager.d.cts.map +1 -0
- package/build/ReactionsManager.d.mts +99 -0
- package/build/ReactionsManager.d.mts.map +1 -0
- package/build/ReactionsManager.js +263 -313
- package/build/ReactionsManager.js.map +1 -1
- package/build/RowData.cjs +37 -0
- package/build/RowData.cjs.map +1 -0
- package/build/RowData.d.cts +53 -0
- package/build/RowData.d.cts.map +1 -0
- package/build/RowData.d.mts +53 -0
- package/build/RowData.d.mts.map +1 -0
- package/build/RowData.js +35 -0
- package/build/RowData.js.map +1 -0
- package/build/Tables.cjs +689 -0
- package/build/Tables.cjs.map +1 -0
- package/build/Tables.d.cts +248 -0
- package/build/Tables.d.cts.map +1 -0
- package/build/Tables.d.mts +248 -0
- package/build/Tables.d.mts.map +1 -0
- package/build/Tables.js +679 -0
- package/build/Tables.js.map +1 -0
- package/build/Todo.cjs +73 -0
- package/build/Todo.cjs.map +1 -0
- package/build/Todo.d.cts +38 -0
- package/build/Todo.d.cts.map +1 -0
- package/build/Todo.d.mts +38 -0
- package/build/Todo.d.mts.map +1 -0
- package/build/Todo.js +57 -61
- package/build/Todo.js.map +1 -1
- package/build/TypeInfo.cjs +80 -0
- package/build/TypeInfo.cjs.map +1 -0
- package/build/TypeInfo.d.cts +57 -0
- package/build/TypeInfo.d.cts.map +1 -0
- package/build/TypeInfo.d.mts +57 -0
- package/build/TypeInfo.d.mts.map +1 -0
- package/build/TypeInfo.js +78 -0
- package/build/TypeInfo.js.map +1 -0
- package/build/_virtual/_rolldown/runtime.cjs +23 -0
- package/build/batchloaders/BatchLoader.cjs +49 -0
- package/build/batchloaders/BatchLoader.cjs.map +1 -0
- package/build/batchloaders/BatchLoader.d.cts +17 -0
- package/build/batchloaders/BatchLoader.d.cts.map +1 -0
- package/build/batchloaders/BatchLoader.d.mts +17 -0
- package/build/batchloaders/BatchLoader.d.mts.map +1 -0
- package/build/batchloaders/BatchLoader.js +45 -54
- package/build/batchloaders/BatchLoader.js.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.cjs +66 -0
- package/build/batchloaders/enumCollectionBatchLoader.cjs.map +1 -0
- package/build/batchloaders/enumCollectionBatchLoader.d.cts +11 -0
- package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/enumCollectionBatchLoader.d.mts +11 -0
- package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/enumCollectionBatchLoader.js +58 -48
- package/build/batchloaders/enumCollectionBatchLoader.js.map +1 -1
- package/build/batchloaders/loadBatchLoader.cjs +78 -0
- package/build/batchloaders/loadBatchLoader.cjs.map +1 -0
- package/build/batchloaders/loadBatchLoader.d.cts +20 -0
- package/build/batchloaders/loadBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/loadBatchLoader.d.mts +20 -0
- package/build/batchloaders/loadBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/loadBatchLoader.js +72 -51
- package/build/batchloaders/loadBatchLoader.js.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.cjs +78 -0
- package/build/batchloaders/manyToManyBatchLoader.cjs.map +1 -0
- package/build/batchloaders/manyToManyBatchLoader.d.cts +11 -0
- package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/manyToManyBatchLoader.d.mts +11 -0
- package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/manyToManyBatchLoader.js +70 -61
- package/build/batchloaders/manyToManyBatchLoader.js.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.cjs +63 -0
- package/build/batchloaders/oneToManyBatchLoader.cjs.map +1 -0
- package/build/batchloaders/oneToManyBatchLoader.d.cts +11 -0
- package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/oneToManyBatchLoader.d.mts +11 -0
- package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/oneToManyBatchLoader.js +58 -48
- package/build/batchloaders/oneToManyBatchLoader.js.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.cjs +64 -0
- package/build/batchloaders/oneToOneBatchLoader.cjs.map +1 -0
- package/build/batchloaders/oneToOneBatchLoader.d.cts +10 -0
- package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/oneToOneBatchLoader.d.mts +10 -0
- package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/oneToOneBatchLoader.js +59 -50
- package/build/batchloaders/oneToOneBatchLoader.js.map +1 -1
- package/build/batchloaders/populateBatchLoader.cjs +156 -0
- package/build/batchloaders/populateBatchLoader.cjs.map +1 -0
- package/build/batchloaders/populateBatchLoader.d.cts +17 -0
- package/build/batchloaders/populateBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/populateBatchLoader.d.mts +17 -0
- package/build/batchloaders/populateBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/populateBatchLoader.js +148 -203
- package/build/batchloaders/populateBatchLoader.js.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.cjs +78 -0
- package/build/batchloaders/recursiveChildrenBatchLoader.cjs.map +1 -0
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +10 -0
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +10 -0
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/recursiveChildrenBatchLoader.js +71 -72
- package/build/batchloaders/recursiveChildrenBatchLoader.js.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.cjs +83 -0
- package/build/batchloaders/recursiveM2mBatchLoader.cjs.map +1 -0
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts +10 -0
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts +10 -0
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/recursiveM2mBatchLoader.js +76 -79
- package/build/batchloaders/recursiveM2mBatchLoader.js.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.cjs +65 -0
- package/build/batchloaders/recursiveParentsBatchLoader.cjs.map +1 -0
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts +10 -0
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -0
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts +10 -0
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -0
- package/build/batchloaders/recursiveParentsBatchLoader.js +58 -55
- package/build/batchloaders/recursiveParentsBatchLoader.js.map +1 -1
- package/build/changes.cjs +222 -0
- package/build/changes.cjs.map +1 -0
- package/build/changes.d.cts +95 -0
- package/build/changes.d.cts.map +1 -0
- package/build/changes.d.mts +95 -0
- package/build/changes.d.mts.map +1 -0
- package/build/changes.js +209 -285
- package/build/changes.js.map +1 -1
- package/build/columns.cjs +63 -0
- package/build/columns.cjs.map +1 -0
- package/build/columns.d.cts +38 -0
- package/build/columns.d.cts.map +1 -0
- package/build/columns.d.mts +38 -0
- package/build/columns.d.mts.map +1 -0
- package/build/columns.js +62 -0
- package/build/columns.js.map +1 -0
- package/build/conditions.cjs +16 -0
- package/build/conditions.cjs.map +1 -0
- package/build/conditions.d.cts +38 -0
- package/build/conditions.d.cts.map +1 -0
- package/build/conditions.d.mts +38 -0
- package/build/conditions.d.mts.map +1 -0
- package/build/conditions.js +14 -0
- package/build/conditions.js.map +1 -0
- package/build/config.cjs +295 -0
- package/build/config.cjs.map +1 -0
- package/build/config.d.cts +277 -0
- package/build/config.d.cts.map +1 -0
- package/build/config.d.mts +277 -0
- package/build/config.d.mts.map +1 -0
- package/build/config.js +255 -301
- package/build/config.js.map +1 -1
- package/build/configure.cjs +324 -0
- package/build/configure.cjs.map +1 -0
- package/build/configure.d.cts +19 -0
- package/build/configure.d.cts.map +1 -0
- package/build/configure.d.mts +19 -0
- package/build/configure.d.mts.map +1 -0
- package/build/configure.js +265 -348
- package/build/configure.js.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.cjs +140 -0
- package/build/dataloaders/fastWhereFilterHash.cjs.map +1 -0
- package/build/dataloaders/fastWhereFilterHash.d.cts +18 -0
- package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -0
- package/build/dataloaders/fastWhereFilterHash.d.mts +18 -0
- package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -0
- package/build/dataloaders/fastWhereFilterHash.js +108 -133
- package/build/dataloaders/fastWhereFilterHash.js.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.cjs +59 -0
- package/build/dataloaders/findByUniqueDataLoader.cjs.map +1 -0
- package/build/dataloaders/findByUniqueDataLoader.d.cts +10 -0
- package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -0
- package/build/dataloaders/findByUniqueDataLoader.d.mts +10 -0
- package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -0
- package/build/dataloaders/findByUniqueDataLoader.js +54 -44
- package/build/dataloaders/findByUniqueDataLoader.js.map +1 -1
- package/build/dataloaders/findCountDataLoader.cjs +124 -0
- package/build/dataloaders/findCountDataLoader.cjs.map +1 -0
- package/build/dataloaders/findCountDataLoader.d.cts +19 -0
- package/build/dataloaders/findCountDataLoader.d.cts.map +1 -0
- package/build/dataloaders/findCountDataLoader.d.mts +19 -0
- package/build/dataloaders/findCountDataLoader.d.mts.map +1 -0
- package/build/dataloaders/findCountDataLoader.js +113 -109
- package/build/dataloaders/findCountDataLoader.js.map +1 -1
- package/build/dataloaders/findDataLoader.cjs +368 -0
- package/build/dataloaders/findDataLoader.cjs.map +1 -0
- package/build/dataloaders/findDataLoader.d.cts +79 -0
- package/build/dataloaders/findDataLoader.d.cts.map +1 -0
- package/build/dataloaders/findDataLoader.d.mts +79 -0
- package/build/dataloaders/findDataLoader.d.mts.map +1 -0
- package/build/dataloaders/findDataLoader.js +301 -382
- package/build/dataloaders/findDataLoader.js.map +1 -1
- package/build/dataloaders/findIdsDataLoader.cjs +83 -0
- package/build/dataloaders/findIdsDataLoader.cjs.map +1 -0
- package/build/dataloaders/findIdsDataLoader.d.cts +9 -0
- package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -0
- package/build/dataloaders/findIdsDataLoader.d.mts +9 -0
- package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -0
- package/build/dataloaders/findIdsDataLoader.js +78 -74
- package/build/dataloaders/findIdsDataLoader.js.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.cjs +121 -0
- package/build/dataloaders/findOrCreateDataLoader.cjs.map +1 -0
- package/build/dataloaders/findOrCreateDataLoader.d.cts +15 -0
- package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -0
- package/build/dataloaders/findOrCreateDataLoader.d.mts +15 -0
- package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -0
- package/build/dataloaders/findOrCreateDataLoader.js +103 -164
- package/build/dataloaders/findOrCreateDataLoader.js.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.cjs +99 -0
- package/build/dataloaders/findPaginatedDataLoader.cjs.map +1 -0
- package/build/dataloaders/findPaginatedDataLoader.d.cts +10 -0
- package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -0
- package/build/dataloaders/findPaginatedDataLoader.d.mts +10 -0
- package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -0
- package/build/dataloaders/findPaginatedDataLoader.js +94 -80
- package/build/dataloaders/findPaginatedDataLoader.js.map +1 -1
- package/build/dataloaders/lensDataLoader.cjs +178 -0
- package/build/dataloaders/lensDataLoader.cjs.map +1 -0
- package/build/dataloaders/lensDataLoader.d.cts +15 -0
- package/build/dataloaders/lensDataLoader.d.cts.map +1 -0
- package/build/dataloaders/lensDataLoader.d.mts +15 -0
- package/build/dataloaders/lensDataLoader.d.mts.map +1 -0
- package/build/dataloaders/lensDataLoader.js +172 -176
- package/build/dataloaders/lensDataLoader.js.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.cjs +87 -0
- package/build/dataloaders/manyToManyFindDataLoader.cjs.map +1 -0
- package/build/dataloaders/manyToManyFindDataLoader.d.cts +13 -0
- package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -0
- package/build/dataloaders/manyToManyFindDataLoader.d.mts +13 -0
- package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -0
- package/build/dataloaders/manyToManyFindDataLoader.js +79 -70
- package/build/dataloaders/manyToManyFindDataLoader.js.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.cjs +80 -0
- package/build/dataloaders/oneToManyFindDataLoader.cjs.map +1 -0
- package/build/dataloaders/oneToManyFindDataLoader.d.cts +13 -0
- package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -0
- package/build/dataloaders/oneToManyFindDataLoader.d.mts +13 -0
- package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -0
- package/build/dataloaders/oneToManyFindDataLoader.js +74 -67
- package/build/dataloaders/oneToManyFindDataLoader.js.map +1 -1
- package/build/defaults.cjs +195 -0
- package/build/defaults.cjs.map +1 -0
- package/build/defaults.d.cts +56 -0
- package/build/defaults.d.cts.map +1 -0
- package/build/defaults.d.mts +56 -0
- package/build/defaults.d.mts.map +1 -0
- package/build/defaults.js +171 -271
- package/build/defaults.js.map +1 -1
- package/build/driverApi.cjs +19 -0
- package/build/driverApi.cjs.map +1 -0
- package/build/driverApi.d.cts +22 -0
- package/build/driverApi.d.cts.map +1 -0
- package/build/driverApi.d.mts +22 -0
- package/build/driverApi.d.mts.map +1 -0
- package/build/driverApi.js +16 -15
- package/build/driverApi.js.map +1 -1
- package/build/drivers/Driver.cjs +5 -0
- package/build/drivers/Driver.d.cts +51 -0
- package/build/drivers/Driver.d.cts.map +1 -0
- package/build/drivers/Driver.d.mts +51 -0
- package/build/drivers/Driver.d.mts.map +1 -0
- package/build/drivers/Driver.js +5 -3
- package/build/drivers/EntityWriter.cjs +213 -0
- package/build/drivers/EntityWriter.cjs.map +1 -0
- package/build/drivers/EntityWriter.d.cts +66 -0
- package/build/drivers/EntityWriter.d.cts.map +1 -0
- package/build/drivers/EntityWriter.d.mts +66 -0
- package/build/drivers/EntityWriter.d.mts.map +1 -0
- package/build/drivers/EntityWriter.js +188 -219
- package/build/drivers/EntityWriter.js.map +1 -1
- package/build/drivers/IdAssigner.cjs +90 -0
- package/build/drivers/IdAssigner.cjs.map +1 -0
- package/build/drivers/IdAssigner.d.cts +50 -0
- package/build/drivers/IdAssigner.d.cts.map +1 -0
- package/build/drivers/IdAssigner.d.mts +50 -0
- package/build/drivers/IdAssigner.d.mts.map +1 -0
- package/build/drivers/IdAssigner.js +81 -124
- package/build/drivers/IdAssigner.js.map +1 -1
- package/build/drivers/buildRawQuery.cjs +113 -0
- package/build/drivers/buildRawQuery.cjs.map +1 -0
- package/build/drivers/buildRawQuery.d.cts +24 -0
- package/build/drivers/buildRawQuery.d.cts.map +1 -0
- package/build/drivers/buildRawQuery.d.mts +24 -0
- package/build/drivers/buildRawQuery.d.mts.map +1 -0
- package/build/drivers/buildRawQuery.js +102 -144
- package/build/drivers/buildRawQuery.js.map +1 -1
- package/build/drivers/buildUtils.cjs +67 -0
- package/build/drivers/buildUtils.cjs.map +1 -0
- package/build/drivers/buildUtils.d.cts +14 -0
- package/build/drivers/buildUtils.d.cts.map +1 -0
- package/build/drivers/buildUtils.d.mts +14 -0
- package/build/drivers/buildUtils.d.mts.map +1 -0
- package/build/drivers/buildUtils.js +54 -77
- package/build/drivers/buildUtils.js.map +1 -1
- package/build/drivers/index.cjs +13 -0
- package/build/drivers/index.d.cts +6 -0
- package/build/drivers/index.d.mts +6 -0
- package/build/drivers/index.js +5 -22
- package/build/execute.cjs +241 -0
- package/build/execute.cjs.map +1 -0
- package/build/execute.d.cts +195 -0
- package/build/execute.d.cts.map +1 -0
- package/build/execute.d.mts +195 -0
- package/build/execute.d.mts.map +1 -0
- package/build/execute.js +238 -0
- package/build/execute.js.map +1 -0
- package/build/fieldSerde.cjs +188 -0
- package/build/fieldSerde.cjs.map +1 -0
- package/build/fieldSerde.d.cts +87 -0
- package/build/fieldSerde.d.cts.map +1 -0
- package/build/fieldSerde.d.mts +87 -0
- package/build/fieldSerde.d.mts.map +1 -0
- package/build/fieldSerde.js +182 -0
- package/build/fieldSerde.js.map +1 -0
- package/build/fields.cjs +127 -0
- package/build/fields.cjs.map +1 -0
- package/build/fields.d.cts +29 -0
- package/build/fields.d.cts.map +1 -0
- package/build/fields.d.mts +29 -0
- package/build/fields.d.mts.map +1 -0
- package/build/fields.js +98 -160
- package/build/fields.js.map +1 -1
- package/build/getProperties.cjs +87 -0
- package/build/getProperties.cjs.map +1 -0
- package/build/getProperties.d.cts +30 -0
- package/build/getProperties.d.cts.map +1 -0
- package/build/getProperties.d.mts +30 -0
- package/build/getProperties.d.mts.map +1 -0
- package/build/getProperties.js +71 -128
- package/build/getProperties.js.map +1 -1
- package/build/index.cjs +516 -0
- package/build/index.cjs.map +1 -0
- package/build/index.d.cts +172 -0
- package/build/index.d.cts.map +1 -0
- package/build/index.d.mts +172 -0
- package/build/index.d.mts.map +1 -0
- package/build/index.js +167 -292
- package/build/index.js.map +1 -1
- package/build/json.cjs +79 -0
- package/build/json.cjs.map +1 -0
- package/build/json.d.cts +76 -0
- package/build/json.d.cts.map +1 -0
- package/build/json.d.mts +76 -0
- package/build/json.d.mts.map +1 -0
- package/build/json.js +68 -106
- package/build/json.js.map +1 -1
- package/build/k.cjs +9 -0
- package/build/k.cjs.map +1 -0
- package/build/k.d.cts +1 -0
- package/build/k.d.mts +1 -0
- package/build/k.js +6 -6
- package/build/k.js.map +1 -1
- package/build/keys.cjs +176 -0
- package/build/keys.cjs.map +1 -0
- package/build/keys.d.cts +53 -0
- package/build/keys.d.cts.map +1 -0
- package/build/keys.d.mts +53 -0
- package/build/keys.d.mts.map +1 -0
- package/build/keys.js +125 -162
- package/build/keys.js.map +1 -1
- package/build/keywords.cjs +136 -0
- package/build/keywords.cjs.map +1 -0
- package/build/keywords.d.cts +18 -0
- package/build/keywords.d.cts.map +1 -0
- package/build/keywords.d.mts +18 -0
- package/build/keywords.d.mts.map +1 -0
- package/build/keywords.js +124 -116
- package/build/keywords.js.map +1 -1
- package/build/loadHints.cjs +100 -0
- package/build/loadHints.cjs.map +1 -0
- package/build/loadHints.d.cts +116 -0
- package/build/loadHints.d.cts.map +1 -0
- package/build/loadHints.d.mts +116 -0
- package/build/loadHints.d.mts.map +1 -0
- package/build/loadHints.js +72 -108
- package/build/loadHints.js.map +1 -1
- package/build/loadLens.cjs +213 -0
- package/build/loadLens.cjs.map +1 -0
- package/build/loadLens.d.cts +77 -0
- package/build/loadLens.d.cts.map +1 -0
- package/build/loadLens.d.mts +77 -0
- package/build/loadLens.d.mts.map +1 -0
- package/build/loadLens.js +152 -270
- package/build/loadLens.js.map +1 -1
- package/build/logging/FactoryLogger.cjs +66 -0
- package/build/logging/FactoryLogger.cjs.map +1 -0
- package/build/logging/FactoryLogger.d.cts +27 -0
- package/build/logging/FactoryLogger.d.cts.map +1 -0
- package/build/logging/FactoryLogger.d.mts +27 -0
- package/build/logging/FactoryLogger.d.mts.map +1 -0
- package/build/logging/FactoryLogger.js +58 -73
- package/build/logging/FactoryLogger.js.map +1 -1
- package/build/logging/FieldLogger.cjs +57 -0
- package/build/logging/FieldLogger.cjs.map +1 -0
- package/build/logging/FieldLogger.d.cts +32 -0
- package/build/logging/FieldLogger.d.cts.map +1 -0
- package/build/logging/FieldLogger.d.mts +32 -0
- package/build/logging/FieldLogger.d.mts.map +1 -0
- package/build/logging/FieldLogger.js +51 -67
- package/build/logging/FieldLogger.js.map +1 -1
- package/build/logging/ReactionLogger.cjs +95 -0
- package/build/logging/ReactionLogger.cjs.map +1 -0
- package/build/logging/ReactionLogger.d.cts +37 -0
- package/build/logging/ReactionLogger.d.cts.map +1 -0
- package/build/logging/ReactionLogger.d.mts +37 -0
- package/build/logging/ReactionLogger.d.mts.map +1 -0
- package/build/logging/ReactionLogger.js +78 -66
- package/build/logging/ReactionLogger.js.map +1 -1
- package/build/newEntity.cjs +89 -0
- package/build/newEntity.cjs.map +1 -0
- package/build/newEntity.d.cts +48 -0
- package/build/newEntity.d.cts.map +1 -0
- package/build/newEntity.d.mts +48 -0
- package/build/newEntity.d.mts.map +1 -0
- package/build/newEntity.js +71 -94
- package/build/newEntity.js.map +1 -1
- package/build/newTestInstance.cjs +539 -0
- package/build/newTestInstance.cjs.map +1 -0
- package/build/newTestInstance.d.cts +207 -0
- package/build/newTestInstance.d.cts.map +1 -0
- package/build/newTestInstance.d.mts +207 -0
- package/build/newTestInstance.d.mts.map +1 -0
- package/build/newTestInstance.js +459 -721
- package/build/newTestInstance.js.map +1 -1
- package/build/normalizeHints.cjs +60 -0
- package/build/normalizeHints.cjs.map +1 -0
- package/build/normalizeHints.d.cts +24 -0
- package/build/normalizeHints.d.cts.map +1 -0
- package/build/normalizeHints.d.mts +24 -0
- package/build/normalizeHints.d.mts.map +1 -0
- package/build/normalizeHints.js +42 -55
- package/build/normalizeHints.js.map +1 -1
- package/build/nowUTC.cjs +15 -0
- package/build/nowUTC.cjs.map +1 -0
- package/build/nowUTC.d.cts +10 -0
- package/build/nowUTC.d.cts.map +1 -0
- package/build/nowUTC.d.mts +10 -0
- package/build/nowUTC.d.mts.map +1 -0
- package/build/nowUTC.js +14 -0
- package/build/nowUTC.js.map +1 -0
- package/build/plugins/ImmutableEntitiesPlugin.cjs +21 -0
- package/build/plugins/ImmutableEntitiesPlugin.cjs.map +1 -0
- package/build/plugins/ImmutableEntitiesPlugin.d.cts +12 -0
- package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -0
- package/build/plugins/ImmutableEntitiesPlugin.d.mts +12 -0
- package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -0
- package/build/plugins/ImmutableEntitiesPlugin.js +19 -20
- package/build/plugins/ImmutableEntitiesPlugin.js.map +1 -1
- package/build/plugins/PreloadPlugin.cjs +6 -0
- package/build/plugins/PreloadPlugin.d.cts +77 -0
- package/build/plugins/PreloadPlugin.d.cts.map +1 -0
- package/build/plugins/PreloadPlugin.d.mts +77 -0
- package/build/plugins/PreloadPlugin.d.mts.map +1 -0
- package/build/plugins/PreloadPlugin.js +6 -3
- package/build/preloading/JsonAggregatePreloader.cjs +283 -0
- package/build/preloading/JsonAggregatePreloader.cjs.map +1 -0
- package/build/preloading/JsonAggregatePreloader.d.cts +19 -0
- package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -0
- package/build/preloading/JsonAggregatePreloader.d.mts +19 -0
- package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -0
- package/build/preloading/JsonAggregatePreloader.js +273 -320
- package/build/preloading/JsonAggregatePreloader.js.map +1 -1
- package/build/preloading/canPreload.cjs +19 -0
- package/build/preloading/canPreload.cjs.map +1 -0
- package/build/preloading/canPreload.d.cts +6 -0
- package/build/preloading/canPreload.d.cts.map +1 -0
- package/build/preloading/canPreload.d.mts +6 -0
- package/build/preloading/canPreload.d.mts.map +1 -0
- package/build/preloading/canPreload.js +15 -21
- package/build/preloading/canPreload.js.map +1 -1
- package/build/preloading/partitionHint.cjs +44 -0
- package/build/preloading/partitionHint.cjs.map +1 -0
- package/build/preloading/partitionHint.d.cts +8 -0
- package/build/preloading/partitionHint.d.cts.map +1 -0
- package/build/preloading/partitionHint.d.mts +8 -0
- package/build/preloading/partitionHint.d.mts.map +1 -0
- package/build/preloading/partitionHint.js +37 -56
- package/build/preloading/partitionHint.js.map +1 -1
- package/build/query.cjs +1352 -0
- package/build/query.cjs.map +1 -0
- package/build/query.d.cts +4051 -0
- package/build/query.d.cts.map +1 -0
- package/build/query.d.mts +4051 -0
- package/build/query.d.mts.map +1 -0
- package/build/query.js +1335 -0
- package/build/query.js.map +1 -0
- package/build/reactiveHints.cjs +332 -0
- package/build/reactiveHints.cjs.map +1 -0
- package/build/reactiveHints.d.cts +143 -0
- package/build/reactiveHints.d.cts.map +1 -0
- package/build/reactiveHints.d.mts +143 -0
- package/build/reactiveHints.d.mts.map +1 -0
- package/build/reactiveHints.js +291 -475
- package/build/reactiveHints.js.map +1 -1
- package/build/relations/AbstractPropertyImpl.cjs +16 -0
- package/build/relations/AbstractPropertyImpl.cjs.map +1 -0
- package/build/relations/AbstractPropertyImpl.d.cts +11 -0
- package/build/relations/AbstractPropertyImpl.d.cts.map +1 -0
- package/build/relations/AbstractPropertyImpl.d.mts +11 -0
- package/build/relations/AbstractPropertyImpl.d.mts.map +1 -0
- package/build/relations/AbstractPropertyImpl.js +13 -13
- package/build/relations/AbstractPropertyImpl.js.map +1 -1
- package/build/relations/AbstractRelationImpl.cjs +20 -0
- package/build/relations/AbstractRelationImpl.cjs.map +1 -0
- package/build/relations/AbstractRelationImpl.d.cts +44 -0
- package/build/relations/AbstractRelationImpl.d.cts.map +1 -0
- package/build/relations/AbstractRelationImpl.d.mts +44 -0
- package/build/relations/AbstractRelationImpl.d.mts.map +1 -0
- package/build/relations/AbstractRelationImpl.js +14 -15
- package/build/relations/AbstractRelationImpl.js.map +1 -1
- package/build/relations/AsyncProperty.cjs +75 -0
- package/build/relations/AsyncProperty.cjs.map +1 -0
- package/build/relations/AsyncProperty.d.cts +40 -0
- package/build/relations/AsyncProperty.d.cts.map +1 -0
- package/build/relations/AsyncProperty.d.mts +40 -0
- package/build/relations/AsyncProperty.d.mts.map +1 -0
- package/build/relations/AsyncProperty.js +61 -70
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs +110 -0
- package/build/relations/AsyncReactiveField.cjs.map +1 -0
- package/build/relations/AsyncReactiveField.d.cts +50 -0
- package/build/relations/AsyncReactiveField.d.cts.map +1 -0
- package/build/relations/AsyncReactiveField.d.mts +50 -0
- package/build/relations/AsyncReactiveField.d.mts.map +1 -0
- package/build/relations/AsyncReactiveField.js +97 -116
- package/build/relations/AsyncReactiveField.js.map +1 -1
- package/build/relations/Collection.cjs +23 -0
- package/build/relations/Collection.cjs.map +1 -0
- package/build/relations/Collection.d.cts +37 -0
- package/build/relations/Collection.d.cts.map +1 -0
- package/build/relations/Collection.d.mts +37 -0
- package/build/relations/Collection.d.mts.map +1 -0
- package/build/relations/Collection.js +14 -11
- package/build/relations/Collection.js.map +1 -1
- package/build/relations/CustomCollection.cjs +144 -0
- package/build/relations/CustomCollection.cjs.map +1 -0
- package/build/relations/CustomCollection.d.cts +74 -0
- package/build/relations/CustomCollection.d.cts.map +1 -0
- package/build/relations/CustomCollection.d.mts +74 -0
- package/build/relations/CustomCollection.d.mts.map +1 -0
- package/build/relations/CustomCollection.js +138 -162
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs +142 -0
- package/build/relations/CustomReference.cjs.map +1 -0
- package/build/relations/CustomReference.d.cts +76 -0
- package/build/relations/CustomReference.d.cts.map +1 -0
- package/build/relations/CustomReference.d.mts +76 -0
- package/build/relations/CustomReference.d.mts.map +1 -0
- package/build/relations/CustomReference.js +135 -147
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs +178 -0
- package/build/relations/EnumCollection.cjs.map +1 -0
- package/build/relations/EnumCollection.d.cts +86 -0
- package/build/relations/EnumCollection.d.cts.map +1 -0
- package/build/relations/EnumCollection.d.mts +86 -0
- package/build/relations/EnumCollection.d.mts.map +1 -0
- package/build/relations/EnumCollection.js +172 -207
- package/build/relations/EnumCollection.js.map +1 -1
- package/build/relations/LargeCollection.cjs +4 -0
- package/build/relations/LargeCollection.d.cts +22 -0
- package/build/relations/LargeCollection.d.cts.map +1 -0
- package/build/relations/LargeCollection.d.mts +22 -0
- package/build/relations/LargeCollection.d.mts.map +1 -0
- package/build/relations/LargeCollection.js +4 -3
- package/build/relations/LazyField.cjs +141 -0
- package/build/relations/LazyField.cjs.map +1 -0
- package/build/relations/LazyField.d.cts +51 -0
- package/build/relations/LazyField.d.cts.map +1 -0
- package/build/relations/LazyField.d.mts +51 -0
- package/build/relations/LazyField.d.mts.map +1 -0
- package/build/relations/LazyField.js +135 -0
- package/build/relations/LazyField.js.map +1 -0
- package/build/relations/ManyToManyCollection.cjs +420 -0
- package/build/relations/ManyToManyCollection.cjs.map +1 -0
- package/build/relations/ManyToManyCollection.d.cts +59 -0
- package/build/relations/ManyToManyCollection.d.cts.map +1 -0
- package/build/relations/ManyToManyCollection.d.mts +59 -0
- package/build/relations/ManyToManyCollection.d.mts.map +1 -0
- package/build/relations/ManyToManyCollection.js +410 -471
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.cjs +91 -0
- package/build/relations/ManyToManyLargeCollection.cjs.map +1 -0
- package/build/relations/ManyToManyLargeCollection.d.cts +34 -0
- package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -0
- package/build/relations/ManyToManyLargeCollection.d.mts +34 -0
- package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -0
- package/build/relations/ManyToManyLargeCollection.js +85 -118
- package/build/relations/ManyToManyLargeCollection.js.map +1 -1
- package/build/relations/ManyToOneReference.cjs +363 -0
- package/build/relations/ManyToOneReference.cjs.map +1 -0
- package/build/relations/ManyToOneReference.d.cts +121 -0
- package/build/relations/ManyToOneReference.d.cts.map +1 -0
- package/build/relations/ManyToOneReference.d.mts +121 -0
- package/build/relations/ManyToOneReference.d.mts.map +1 -0
- package/build/relations/ManyToOneReference.js +343 -411
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs +492 -0
- package/build/relations/OneToManyCollection.cjs.map +1 -0
- package/build/relations/OneToManyCollection.d.cts +69 -0
- package/build/relations/OneToManyCollection.d.cts.map +1 -0
- package/build/relations/OneToManyCollection.d.mts +69 -0
- package/build/relations/OneToManyCollection.d.mts.map +1 -0
- package/build/relations/OneToManyCollection.js +480 -579
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs +85 -0
- package/build/relations/OneToManyLargeCollection.cjs.map +1 -0
- package/build/relations/OneToManyLargeCollection.d.cts +29 -0
- package/build/relations/OneToManyLargeCollection.d.cts.map +1 -0
- package/build/relations/OneToManyLargeCollection.d.mts +29 -0
- package/build/relations/OneToManyLargeCollection.d.mts.map +1 -0
- package/build/relations/OneToManyLargeCollection.js +79 -99
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs +208 -0
- package/build/relations/OneToOneReference.cjs.map +1 -0
- package/build/relations/OneToOneReference.d.cts +97 -0
- package/build/relations/OneToOneReference.d.cts.map +1 -0
- package/build/relations/OneToOneReference.d.mts +97 -0
- package/build/relations/OneToOneReference.d.mts.map +1 -0
- package/build/relations/OneToOneReference.js +192 -221
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs +209 -0
- package/build/relations/PolymorphicReference.cjs.map +1 -0
- package/build/relations/PolymorphicReference.d.cts +93 -0
- package/build/relations/PolymorphicReference.d.cts.map +1 -0
- package/build/relations/PolymorphicReference.d.mts +93 -0
- package/build/relations/PolymorphicReference.d.mts.map +1 -0
- package/build/relations/PolymorphicReference.js +199 -237
- package/build/relations/PolymorphicReference.js.map +1 -1
- package/build/relations/PropertySymbols.cjs +7 -0
- package/build/relations/PropertySymbols.cjs.map +1 -0
- package/build/relations/PropertySymbols.d.cts +5 -0
- package/build/relations/PropertySymbols.d.cts.map +1 -0
- package/build/relations/PropertySymbols.d.mts +5 -0
- package/build/relations/PropertySymbols.d.mts.map +1 -0
- package/build/relations/PropertySymbols.js +6 -0
- package/build/relations/PropertySymbols.js.map +1 -0
- package/build/relations/ReactiveField.cjs +115 -0
- package/build/relations/ReactiveField.cjs.map +1 -0
- package/build/relations/ReactiveField.d.cts +88 -0
- package/build/relations/ReactiveField.d.cts.map +1 -0
- package/build/relations/ReactiveField.d.mts +88 -0
- package/build/relations/ReactiveField.d.mts.map +1 -0
- package/build/relations/ReactiveField.js +105 -137
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs +41 -0
- package/build/relations/ReactiveGetter.cjs.map +1 -0
- package/build/relations/ReactiveGetter.d.cts +33 -0
- package/build/relations/ReactiveGetter.d.cts.map +1 -0
- package/build/relations/ReactiveGetter.d.mts +33 -0
- package/build/relations/ReactiveGetter.d.mts.map +1 -0
- package/build/relations/ReactiveGetter.js +31 -31
- package/build/relations/ReactiveGetter.js.map +1 -1
- package/build/relations/ReactiveManyToMany.cjs +198 -0
- package/build/relations/ReactiveManyToMany.cjs.map +1 -0
- package/build/relations/ReactiveManyToMany.d.cts +63 -0
- package/build/relations/ReactiveManyToMany.d.cts.map +1 -0
- package/build/relations/ReactiveManyToMany.d.mts +63 -0
- package/build/relations/ReactiveManyToMany.d.mts.map +1 -0
- package/build/relations/ReactiveManyToMany.js +187 -238
- package/build/relations/ReactiveManyToMany.js.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.cjs +150 -0
- package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -0
- package/build/relations/ReactiveManyToManyOtherSide.d.cts +53 -0
- package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -0
- package/build/relations/ReactiveManyToManyOtherSide.d.mts +53 -0
- package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -0
- package/build/relations/ReactiveManyToManyOtherSide.js +141 -152
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs +336 -0
- package/build/relations/ReactiveReference.cjs.map +1 -0
- package/build/relations/ReactiveReference.d.cts +124 -0
- package/build/relations/ReactiveReference.d.cts.map +1 -0
- package/build/relations/ReactiveReference.d.mts +124 -0
- package/build/relations/ReactiveReference.d.mts.map +1 -0
- package/build/relations/ReactiveReference.js +321 -385
- package/build/relations/ReactiveReference.js.map +1 -1
- package/build/relations/ReadOnlyCollection.cjs +18 -0
- package/build/relations/ReadOnlyCollection.cjs.map +1 -0
- package/build/relations/ReadOnlyCollection.d.cts +22 -0
- package/build/relations/ReadOnlyCollection.d.cts.map +1 -0
- package/build/relations/ReadOnlyCollection.d.mts +22 -0
- package/build/relations/ReadOnlyCollection.d.mts.map +1 -0
- package/build/relations/ReadOnlyCollection.js +9 -9
- package/build/relations/ReadOnlyCollection.js.map +1 -1
- package/build/relations/RecursiveCollection.cjs +387 -0
- package/build/relations/RecursiveCollection.cjs.map +1 -0
- package/build/relations/RecursiveCollection.d.cts +112 -0
- package/build/relations/RecursiveCollection.d.cts.map +1 -0
- package/build/relations/RecursiveCollection.d.mts +112 -0
- package/build/relations/RecursiveCollection.d.mts.map +1 -0
- package/build/relations/RecursiveCollection.js +368 -427
- package/build/relations/RecursiveCollection.js.map +1 -1
- package/build/relations/RecursiveCycleError.cjs +17 -0
- package/build/relations/RecursiveCycleError.cjs.map +1 -0
- package/build/relations/RecursiveCycleError.d.cts +15 -0
- package/build/relations/RecursiveCycleError.d.cts.map +1 -0
- package/build/relations/RecursiveCycleError.d.mts +15 -0
- package/build/relations/RecursiveCycleError.d.mts.map +1 -0
- package/build/relations/RecursiveCycleError.js +14 -13
- package/build/relations/RecursiveCycleError.js.map +1 -1
- package/build/relations/Reference.cjs +25 -0
- package/build/relations/Reference.cjs.map +1 -0
- package/build/relations/Reference.d.cts +39 -0
- package/build/relations/Reference.d.cts.map +1 -0
- package/build/relations/Reference.d.mts +39 -0
- package/build/relations/Reference.d.mts.map +1 -0
- package/build/relations/Reference.js +15 -14
- package/build/relations/Reference.js.map +1 -1
- package/build/relations/ReferenceSymbols.cjs +7 -0
- package/build/relations/ReferenceSymbols.cjs.map +1 -0
- package/build/relations/ReferenceSymbols.d.cts +5 -0
- package/build/relations/ReferenceSymbols.d.cts.map +1 -0
- package/build/relations/ReferenceSymbols.d.mts +5 -0
- package/build/relations/ReferenceSymbols.d.mts.map +1 -0
- package/build/relations/ReferenceSymbols.js +6 -0
- package/build/relations/ReferenceSymbols.js.map +1 -0
- package/build/relations/Relation.cjs +17 -0
- package/build/relations/Relation.cjs.map +1 -0
- package/build/relations/Relation.d.cts +16 -0
- package/build/relations/Relation.d.cts.map +1 -0
- package/build/relations/Relation.d.mts +16 -0
- package/build/relations/Relation.d.mts.map +1 -0
- package/build/relations/Relation.js +10 -8
- package/build/relations/Relation.js.map +1 -1
- package/build/relations/RelationSymbols.cjs +9 -0
- package/build/relations/RelationSymbols.cjs.map +1 -0
- package/build/relations/RelationSymbols.d.cts +6 -0
- package/build/relations/RelationSymbols.d.cts.map +1 -0
- package/build/relations/RelationSymbols.d.mts +6 -0
- package/build/relations/RelationSymbols.d.mts.map +1 -0
- package/build/relations/RelationSymbols.js +7 -0
- package/build/relations/RelationSymbols.js.map +1 -0
- package/build/relations/hasAsyncMethod.cjs +47 -0
- package/build/relations/hasAsyncMethod.cjs.map +1 -0
- package/build/relations/hasAsyncMethod.d.cts +29 -0
- package/build/relations/hasAsyncMethod.d.cts.map +1 -0
- package/build/relations/hasAsyncMethod.d.mts +29 -0
- package/build/relations/hasAsyncMethod.d.mts.map +1 -0
- package/build/relations/hasAsyncMethod.js +40 -43
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.cjs +35 -0
- package/build/relations/hasManyDerived.cjs.map +1 -0
- package/build/relations/hasManyDerived.d.cts +25 -0
- package/build/relations/hasManyDerived.d.cts.map +1 -0
- package/build/relations/hasManyDerived.d.mts +25 -0
- package/build/relations/hasManyDerived.d.mts.map +1 -0
- package/build/relations/hasManyDerived.js +30 -28
- package/build/relations/hasManyDerived.js.map +1 -1
- package/build/relations/hasManyThrough.cjs +29 -0
- package/build/relations/hasManyThrough.cjs.map +1 -0
- package/build/relations/hasManyThrough.d.cts +16 -0
- package/build/relations/hasManyThrough.d.cts.map +1 -0
- package/build/relations/hasManyThrough.d.mts +16 -0
- package/build/relations/hasManyThrough.d.mts.map +1 -0
- package/build/relations/hasManyThrough.js +24 -20
- package/build/relations/hasManyThrough.js.map +1 -1
- package/build/relations/hasOneDerived.cjs +32 -0
- package/build/relations/hasOneDerived.cjs.map +1 -0
- package/build/relations/hasOneDerived.d.cts +15 -0
- package/build/relations/hasOneDerived.d.cts.map +1 -0
- package/build/relations/hasOneDerived.d.mts +15 -0
- package/build/relations/hasOneDerived.d.mts.map +1 -0
- package/build/relations/hasOneDerived.js +27 -20
- package/build/relations/hasOneDerived.js.map +1 -1
- package/build/relations/hasOneThrough.cjs +31 -0
- package/build/relations/hasOneThrough.cjs.map +1 -0
- package/build/relations/hasOneThrough.d.cts +16 -0
- package/build/relations/hasOneThrough.d.cts.map +1 -0
- package/build/relations/hasOneThrough.d.mts +16 -0
- package/build/relations/hasOneThrough.d.mts.map +1 -0
- package/build/relations/hasOneThrough.js +26 -22
- package/build/relations/hasOneThrough.js.map +1 -1
- package/build/relations/hasProperty.cjs +109 -0
- package/build/relations/hasProperty.cjs.map +1 -0
- package/build/relations/hasProperty.d.cts +53 -0
- package/build/relations/hasProperty.d.cts.map +1 -0
- package/build/relations/hasProperty.d.mts +53 -0
- package/build/relations/hasProperty.d.mts.map +1 -0
- package/build/relations/hasProperty.js +90 -95
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/index.cjs +99 -0
- package/build/relations/index.d.cts +32 -0
- package/build/relations/index.d.mts +32 -0
- package/build/relations/index.js +31 -97
- package/build/resurrection.cjs +74 -0
- package/build/resurrection.cjs.map +1 -0
- package/build/resurrection.d.cts +13 -0
- package/build/resurrection.d.cts.map +1 -0
- package/build/resurrection.d.mts +13 -0
- package/build/resurrection.d.mts.map +1 -0
- package/build/resurrection.js +48 -69
- package/build/resurrection.js.map +1 -1
- package/build/rules.cjs +228 -0
- package/build/rules.cjs.map +1 -0
- package/build/rules.d.cts +145 -0
- package/build/rules.d.cts.map +1 -0
- package/build/rules.d.mts +145 -0
- package/build/rules.d.mts.map +1 -0
- package/build/rules.js +190 -204
- package/build/rules.js.map +1 -1
- package/build/runtimeConfig.cjs +25 -0
- package/build/runtimeConfig.cjs.map +1 -0
- package/build/runtimeConfig.d.cts +24 -0
- package/build/runtimeConfig.d.cts.map +1 -0
- package/build/runtimeConfig.d.mts +24 -0
- package/build/runtimeConfig.d.mts.map +1 -0
- package/build/runtimeConfig.js +16 -12
- package/build/runtimeConfig.js.map +1 -1
- package/build/scopes.cjs +302 -0
- package/build/scopes.cjs.map +1 -0
- package/build/scopes.d.cts +188 -0
- package/build/scopes.d.cts.map +1 -0
- package/build/scopes.d.mts +188 -0
- package/build/scopes.d.mts.map +1 -0
- package/build/scopes.js +240 -245
- package/build/scopes.js.map +1 -1
- package/build/serde.cjs +500 -0
- package/build/serde.cjs.map +1 -0
- package/build/serde.d.cts +248 -0
- package/build/serde.d.cts.map +1 -0
- package/build/serde.d.mts +248 -0
- package/build/serde.d.mts.map +1 -0
- package/build/serde.js +474 -505
- package/build/serde.js.map +1 -1
- package/build/skipCondition.cjs +15 -0
- package/build/skipCondition.cjs.map +1 -0
- package/build/skipCondition.d.cts +7 -0
- package/build/skipCondition.d.cts.map +1 -0
- package/build/skipCondition.d.mts +7 -0
- package/build/skipCondition.d.mts.map +1 -0
- package/build/skipCondition.js +14 -0
- package/build/skipCondition.js.map +1 -0
- package/build/temporal.cjs +57 -0
- package/build/temporal.cjs.map +1 -0
- package/build/temporal.d.cts +44 -0
- package/build/temporal.d.cts.map +1 -0
- package/build/temporal.d.mts +44 -0
- package/build/temporal.d.mts.map +1 -0
- package/build/temporal.js +47 -58
- package/build/temporal.js.map +1 -1
- package/build/temporalMappers.cjs +63 -0
- package/build/temporalMappers.cjs.map +1 -0
- package/build/temporalMappers.d.cts +36 -0
- package/build/temporalMappers.d.cts.map +1 -0
- package/build/temporalMappers.d.mts +36 -0
- package/build/temporalMappers.d.mts.map +1 -0
- package/build/temporalMappers.js +55 -55
- package/build/temporalMappers.js.map +1 -1
- package/build/trusted.cjs +16 -0
- package/build/trusted.cjs.map +1 -0
- package/build/trusted.d.cts +8 -0
- package/build/trusted.d.cts.map +1 -0
- package/build/trusted.d.mts +8 -0
- package/build/trusted.d.mts.map +1 -0
- package/build/trusted.js +8 -8
- package/build/trusted.js.map +1 -1
- package/build/typeMap.cjs +3 -0
- package/build/typeMap.d.cts +88 -0
- package/build/typeMap.d.cts.map +1 -0
- package/build/typeMap.d.mts +88 -0
- package/build/typeMap.d.mts.map +1 -0
- package/build/typeMap.js +3 -3
- package/build/unnest.cjs +64 -0
- package/build/unnest.cjs.map +1 -0
- package/build/unnest.d.cts +16 -0
- package/build/unnest.d.cts.map +1 -0
- package/build/unnest.d.mts +16 -0
- package/build/unnest.d.mts.map +1 -0
- package/build/unnest.js +50 -73
- package/build/unnest.js.map +1 -1
- package/build/upsert.cjs +175 -0
- package/build/upsert.cjs.map +1 -0
- package/build/upsert.d.cts +42 -0
- package/build/upsert.d.cts.map +1 -0
- package/build/upsert.d.mts +42 -0
- package/build/upsert.d.mts.map +1 -0
- package/build/upsert.js +159 -274
- package/build/upsert.js.map +1 -1
- package/build/utils.cjs +206 -0
- package/build/utils.cjs.map +1 -0
- package/build/utils.d.cts +65 -0
- package/build/utils.d.cts.map +1 -0
- package/build/utils.d.mts +65 -0
- package/build/utils.d.mts.map +1 -0
- package/build/utils.js +125 -192
- package/build/utils.js.map +1 -1
- package/build/withLoaded.cjs +65 -0
- package/build/withLoaded.cjs.map +1 -0
- package/build/withLoaded.d.cts +65 -0
- package/build/withLoaded.d.cts.map +1 -0
- package/build/withLoaded.d.mts +65 -0
- package/build/withLoaded.d.mts.map +1 -0
- package/build/withLoaded.js +56 -70
- package/build/withLoaded.js.map +1 -1
- package/package.json +34 -14
- package/build/AliasAssigner.d.ts +0 -10
- package/build/AliasAssigner.d.ts.map +0 -1
- package/build/Aliases.d.ts +0 -117
- package/build/Aliases.d.ts.map +0 -1
- package/build/BaseEntity.d.ts +0 -68
- package/build/BaseEntity.d.ts.map +0 -1
- package/build/ConditionBuilder.d.ts +0 -29
- package/build/ConditionBuilder.d.ts.map +0 -1
- package/build/Entity.d.ts +0 -39
- package/build/Entity.d.ts.map +0 -1
- package/build/EntityFields.d.ts +0 -37
- package/build/EntityFields.d.ts.map +0 -1
- package/build/EntityFields.js.map +0 -1
- package/build/EntityFilter.d.ts +0 -134
- package/build/EntityFilter.d.ts.map +0 -1
- package/build/EntityGraphQLFilter.d.ts +0 -56
- package/build/EntityGraphQLFilter.d.ts.map +0 -1
- package/build/EntityManager.d.ts +0 -740
- package/build/EntityManager.d.ts.map +0 -1
- package/build/EntityMetadata.d.ts +0 -233
- package/build/EntityMetadata.d.ts.map +0 -1
- package/build/EnumMetadata.d.ts +0 -15
- package/build/EnumMetadata.d.ts.map +0 -1
- package/build/EnumMetadata.js.map +0 -1
- package/build/FlushLock.d.ts +0 -26
- package/build/FlushLock.d.ts.map +0 -1
- package/build/HintTree.d.ts +0 -42
- package/build/HintTree.d.ts.map +0 -1
- package/build/IndexManager.d.ts +0 -31
- package/build/IndexManager.d.ts.map +0 -1
- package/build/InstanceData.d.ts +0 -79
- package/build/InstanceData.d.ts.map +0 -1
- package/build/IsLoadedCache.d.ts +0 -32
- package/build/IsLoadedCache.d.ts.map +0 -1
- package/build/JoinRows.d.ts +0 -117
- package/build/JoinRows.d.ts.map +0 -1
- package/build/PendingChanges.d.ts +0 -26
- package/build/PendingChanges.d.ts.map +0 -1
- package/build/PendingChanges.js.map +0 -1
- package/build/PluginManager.d.ts +0 -102
- package/build/PluginManager.d.ts.map +0 -1
- package/build/QueryParser.collectionJoins.d.ts +0 -27
- package/build/QueryParser.collectionJoins.d.ts.map +0 -1
- package/build/QueryParser.collectionJoins.test.d.ts +0 -2
- package/build/QueryParser.collectionJoins.test.d.ts.map +0 -1
- package/build/QueryParser.collectionJoins.test.js +0 -772
- package/build/QueryParser.collectionJoins.test.js.map +0 -1
- package/build/QueryParser.d.ts +0 -336
- package/build/QueryParser.d.ts.map +0 -1
- package/build/QueryParser.pruning.d.ts +0 -7
- package/build/QueryParser.pruning.d.ts.map +0 -1
- package/build/QueryParser.pruning.test.d.ts +0 -2
- package/build/QueryParser.pruning.test.d.ts.map +0 -1
- package/build/QueryParser.pruning.test.js +0 -106
- package/build/QueryParser.pruning.test.js.map +0 -1
- package/build/QueryParser.test.d.ts +0 -2
- package/build/QueryParser.test.d.ts.map +0 -1
- package/build/QueryParser.test.js +0 -27
- package/build/QueryParser.test.js.map +0 -1
- package/build/QueryVisitor.d.ts +0 -19
- package/build/QueryVisitor.d.ts.map +0 -1
- package/build/ReactionsManager.d.ts +0 -85
- package/build/ReactionsManager.d.ts.map +0 -1
- package/build/Todo.d.ts +0 -35
- package/build/Todo.d.ts.map +0 -1
- package/build/batchloaders/BatchLoader.d.ts +0 -14
- package/build/batchloaders/BatchLoader.d.ts.map +0 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.ts +0 -7
- package/build/batchloaders/enumCollectionBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/loadBatchLoader.d.ts +0 -17
- package/build/batchloaders/loadBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/manyToManyBatchLoader.d.ts +0 -7
- package/build/batchloaders/manyToManyBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/oneToManyBatchLoader.d.ts +0 -7
- package/build/batchloaders/oneToManyBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/oneToOneBatchLoader.d.ts +0 -7
- package/build/batchloaders/oneToOneBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/populateBatchLoader.d.ts +0 -13
- package/build/batchloaders/populateBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.ts +0 -7
- package/build/batchloaders/recursiveChildrenBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.ts +0 -7
- package/build/batchloaders/recursiveM2mBatchLoader.d.ts.map +0 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.ts +0 -7
- package/build/batchloaders/recursiveParentsBatchLoader.d.ts.map +0 -1
- package/build/changes.d.ts +0 -92
- package/build/changes.d.ts.map +0 -1
- package/build/config.d.ts +0 -250
- package/build/config.d.ts.map +0 -1
- package/build/config.test.d.ts +0 -2
- package/build/config.test.d.ts.map +0 -1
- package/build/config.test.js +0 -53
- package/build/config.test.js.map +0 -1
- package/build/configure.d.ts +0 -15
- package/build/configure.d.ts.map +0 -1
- package/build/dataloaders/fastWhereFilterHash.d.ts +0 -15
- package/build/dataloaders/fastWhereFilterHash.d.ts.map +0 -1
- package/build/dataloaders/fastWhereFilterHash.test.d.ts +0 -2
- package/build/dataloaders/fastWhereFilterHash.test.d.ts.map +0 -1
- package/build/dataloaders/fastWhereFilterHash.test.js +0 -59
- package/build/dataloaders/fastWhereFilterHash.test.js.map +0 -1
- package/build/dataloaders/findByUniqueDataLoader.d.ts +0 -7
- package/build/dataloaders/findByUniqueDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findCountDataLoader.d.ts +0 -16
- package/build/dataloaders/findCountDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findDataLoader.d.ts +0 -76
- package/build/dataloaders/findDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findIdsDataLoader.d.ts +0 -6
- package/build/dataloaders/findIdsDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findOrCreateDataLoader.d.ts +0 -13
- package/build/dataloaders/findOrCreateDataLoader.d.ts.map +0 -1
- package/build/dataloaders/findPaginatedDataLoader.d.ts +0 -7
- package/build/dataloaders/findPaginatedDataLoader.d.ts.map +0 -1
- package/build/dataloaders/lensDataLoader.d.ts +0 -12
- package/build/dataloaders/lensDataLoader.d.ts.map +0 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.ts +0 -8
- package/build/dataloaders/manyToManyFindDataLoader.d.ts.map +0 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.ts +0 -8
- package/build/dataloaders/oneToManyFindDataLoader.d.ts.map +0 -1
- package/build/defaults.d.ts +0 -54
- package/build/defaults.d.ts.map +0 -1
- package/build/driverApi.d.ts +0 -19
- package/build/driverApi.d.ts.map +0 -1
- package/build/drivers/Driver.d.ts +0 -26
- package/build/drivers/Driver.d.ts.map +0 -1
- package/build/drivers/Driver.js.map +0 -1
- package/build/drivers/EntityWriter.d.ts +0 -64
- package/build/drivers/EntityWriter.d.ts.map +0 -1
- package/build/drivers/IdAssigner.d.ts +0 -48
- package/build/drivers/IdAssigner.d.ts.map +0 -1
- package/build/drivers/buildRawQuery.d.ts +0 -22
- package/build/drivers/buildRawQuery.d.ts.map +0 -1
- package/build/drivers/buildUtils.d.ts +0 -9
- package/build/drivers/buildUtils.d.ts.map +0 -1
- package/build/drivers/index.d.ts +0 -6
- package/build/drivers/index.d.ts.map +0 -1
- package/build/drivers/index.js.map +0 -1
- package/build/fields.d.ts +0 -26
- package/build/fields.d.ts.map +0 -1
- package/build/getProperties.d.ts +0 -28
- package/build/getProperties.d.ts.map +0 -1
- package/build/index.d.ts +0 -133
- package/build/index.d.ts.map +0 -1
- package/build/json.d.ts +0 -77
- package/build/json.d.ts.map +0 -1
- package/build/k.d.ts +0 -2
- package/build/k.d.ts.map +0 -1
- package/build/keys.d.ts +0 -49
- package/build/keys.d.ts.map +0 -1
- package/build/keywords.d.ts +0 -5
- package/build/keywords.d.ts.map +0 -1
- package/build/loadHints.d.ts +0 -121
- package/build/loadHints.d.ts.map +0 -1
- package/build/loadLens.d.ts +0 -77
- package/build/loadLens.d.ts.map +0 -1
- package/build/logging/FactoryLogger.d.ts +0 -24
- package/build/logging/FactoryLogger.d.ts.map +0 -1
- package/build/logging/FieldLogger.d.ts +0 -27
- package/build/logging/FieldLogger.d.ts.map +0 -1
- package/build/logging/ReactionLogger.d.ts +0 -27
- package/build/logging/ReactionLogger.d.ts.map +0 -1
- package/build/newEntity.d.ts +0 -45
- package/build/newEntity.d.ts.map +0 -1
- package/build/newTestInstance.d.ts +0 -208
- package/build/newTestInstance.d.ts.map +0 -1
- package/build/normalizeHints.d.ts +0 -23
- package/build/normalizeHints.d.ts.map +0 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.ts +0 -9
- package/build/plugins/ImmutableEntitiesPlugin.d.ts.map +0 -1
- package/build/plugins/PreloadPlugin.d.ts +0 -69
- package/build/plugins/PreloadPlugin.d.ts.map +0 -1
- package/build/plugins/PreloadPlugin.js.map +0 -1
- package/build/preloading/JsonAggregatePreloader.d.ts +0 -16
- package/build/preloading/JsonAggregatePreloader.d.ts.map +0 -1
- package/build/preloading/canPreload.d.ts +0 -3
- package/build/preloading/canPreload.d.ts.map +0 -1
- package/build/preloading/partitionHint.d.ts +0 -5
- package/build/preloading/partitionHint.d.ts.map +0 -1
- package/build/reactiveHints.d.ts +0 -146
- package/build/reactiveHints.d.ts.map +0 -1
- package/build/relations/AbstractPropertyImpl.d.ts +0 -8
- package/build/relations/AbstractPropertyImpl.d.ts.map +0 -1
- package/build/relations/AbstractRelationImpl.d.ts +0 -41
- package/build/relations/AbstractRelationImpl.d.ts.map +0 -1
- package/build/relations/AsyncProperty.d.ts +0 -36
- package/build/relations/AsyncProperty.d.ts.map +0 -1
- package/build/relations/AsyncReactiveField.d.ts +0 -41
- package/build/relations/AsyncReactiveField.d.ts.map +0 -1
- package/build/relations/Collection.d.ts +0 -33
- package/build/relations/Collection.d.ts.map +0 -1
- package/build/relations/CustomCollection.d.ts +0 -69
- package/build/relations/CustomCollection.d.ts.map +0 -1
- package/build/relations/CustomReference.d.ts +0 -71
- package/build/relations/CustomReference.d.ts.map +0 -1
- package/build/relations/EnumCollection.d.ts +0 -81
- package/build/relations/EnumCollection.d.ts.map +0 -1
- package/build/relations/LargeCollection.d.ts +0 -19
- package/build/relations/LargeCollection.d.ts.map +0 -1
- package/build/relations/LargeCollection.js.map +0 -1
- package/build/relations/ManyToManyCollection.d.ts +0 -52
- package/build/relations/ManyToManyCollection.d.ts.map +0 -1
- package/build/relations/ManyToManyLargeCollection.d.ts +0 -31
- package/build/relations/ManyToManyLargeCollection.d.ts.map +0 -1
- package/build/relations/ManyToOneReference.d.ts +0 -117
- package/build/relations/ManyToOneReference.d.ts.map +0 -1
- package/build/relations/OneToManyCollection.d.ts +0 -62
- package/build/relations/OneToManyCollection.d.ts.map +0 -1
- package/build/relations/OneToManyLargeCollection.d.ts +0 -26
- package/build/relations/OneToManyLargeCollection.d.ts.map +0 -1
- package/build/relations/OneToOneReference.d.ts +0 -93
- package/build/relations/OneToOneReference.d.ts.map +0 -1
- package/build/relations/PolymorphicReference.d.ts +0 -89
- package/build/relations/PolymorphicReference.d.ts.map +0 -1
- package/build/relations/ReactiveField.d.ts +0 -85
- package/build/relations/ReactiveField.d.ts.map +0 -1
- package/build/relations/ReactiveGetter.d.ts +0 -30
- package/build/relations/ReactiveGetter.d.ts.map +0 -1
- package/build/relations/ReactiveManyToMany.d.ts +0 -57
- package/build/relations/ReactiveManyToMany.d.ts.map +0 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.ts +0 -48
- package/build/relations/ReactiveManyToManyOtherSide.d.ts.map +0 -1
- package/build/relations/ReactiveReference.d.ts +0 -119
- package/build/relations/ReactiveReference.d.ts.map +0 -1
- package/build/relations/ReadOnlyCollection.d.ts +0 -19
- package/build/relations/ReadOnlyCollection.d.ts.map +0 -1
- package/build/relations/RecursiveCollection.d.ts +0 -108
- package/build/relations/RecursiveCollection.d.ts.map +0 -1
- package/build/relations/RecursiveCycleError.d.ts +0 -13
- package/build/relations/RecursiveCycleError.d.ts.map +0 -1
- package/build/relations/Reference.d.ts +0 -35
- package/build/relations/Reference.d.ts.map +0 -1
- package/build/relations/Relation.d.ts +0 -14
- package/build/relations/Relation.d.ts.map +0 -1
- package/build/relations/hasAsyncMethod.d.ts +0 -27
- package/build/relations/hasAsyncMethod.d.ts.map +0 -1
- package/build/relations/hasManyDerived.d.ts +0 -22
- package/build/relations/hasManyDerived.d.ts.map +0 -1
- package/build/relations/hasManyThrough.d.ts +0 -10
- package/build/relations/hasManyThrough.d.ts.map +0 -1
- package/build/relations/hasOneDerived.d.ts +0 -12
- package/build/relations/hasOneDerived.d.ts.map +0 -1
- package/build/relations/hasOneThrough.d.ts +0 -10
- package/build/relations/hasOneThrough.d.ts.map +0 -1
- package/build/relations/hasProperty.d.ts +0 -50
- package/build/relations/hasProperty.d.ts.map +0 -1
- package/build/relations/index.d.ts +0 -30
- package/build/relations/index.d.ts.map +0 -1
- package/build/relations/index.js.map +0 -1
- package/build/resurrection.d.ts +0 -10
- package/build/resurrection.d.ts.map +0 -1
- package/build/rules.d.ts +0 -123
- package/build/rules.d.ts.map +0 -1
- package/build/runtimeConfig.d.ts +0 -17
- package/build/runtimeConfig.d.ts.map +0 -1
- package/build/scopes.d.ts +0 -185
- package/build/scopes.d.ts.map +0 -1
- package/build/serde.d.ts +0 -277
- package/build/serde.d.ts.map +0 -1
- package/build/temporal.d.ts +0 -46
- package/build/temporal.d.ts.map +0 -1
- package/build/temporalMappers.d.ts +0 -25
- package/build/temporalMappers.d.ts.map +0 -1
- package/build/trusted.d.ts +0 -5
- package/build/trusted.d.ts.map +0 -1
- package/build/typeMap.d.ts +0 -68
- package/build/typeMap.d.ts.map +0 -1
- package/build/typeMap.js.map +0 -1
- package/build/unnest.d.ts +0 -13
- package/build/unnest.d.ts.map +0 -1
- package/build/upsert.d.ts +0 -42
- package/build/upsert.d.ts.map +0 -1
- package/build/utils.d.ts +0 -60
- package/build/utils.d.ts.map +0 -1
- package/build/withLoaded.d.ts +0 -56
- package/build/withLoaded.d.ts.map +0 -1
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_conditions = require("./conditions.cjs");
|
|
3
|
+
const require_scopes = require("./scopes.cjs");
|
|
4
|
+
require("./EntityFilter.cjs");
|
|
5
|
+
const require_keywords = require("./keywords.cjs");
|
|
6
|
+
const require_keys = require("./keys.cjs");
|
|
7
|
+
const require_EntityMetadata = require("./EntityMetadata.cjs");
|
|
8
|
+
const require_utils = require("./utils.cjs");
|
|
9
|
+
const require_Expr = require("./Expr.cjs");
|
|
10
|
+
const require_ConditionBuilder = require("./ConditionBuilder.cjs");
|
|
11
|
+
const require_QueryParser_pruning = require("./QueryParser.pruning.cjs");
|
|
12
|
+
const require_QueryVisitor = require("./QueryVisitor.cjs");
|
|
13
|
+
const require_DeferredAlias = require("./DeferredAlias.cjs");
|
|
14
|
+
require("./index.cjs");
|
|
15
|
+
const require_EntityManager = require("./EntityManager.cjs");
|
|
16
|
+
const require_Entity = require("./Entity.cjs");
|
|
17
|
+
const require_configure = require("./configure.cjs");
|
|
18
|
+
const require_Aliases = require("./Aliases.cjs");
|
|
19
|
+
let joist_utils = require("joist-utils");
|
|
20
|
+
//#region src/QueryParser.ts
|
|
21
|
+
/**
|
|
22
|
+
* Parses an `em.find` filter into a logical `ParsedFindQuery` AST, leaving optimization/pruning to callers.
|
|
23
|
+
*
|
|
24
|
+
* The main execution flow is:
|
|
25
|
+
* parseFindQuery -> beforeFind plugins -> optimizeCollectionJoins -> pruneUnusedJoins -> execute SQL.
|
|
26
|
+
*/
|
|
27
|
+
function parseFindQuery(meta, filter, opts = {}) {
|
|
28
|
+
const selects = [];
|
|
29
|
+
const tables = [];
|
|
30
|
+
const orderBys = [];
|
|
31
|
+
const query = {
|
|
32
|
+
selects,
|
|
33
|
+
tables,
|
|
34
|
+
orderBys
|
|
35
|
+
};
|
|
36
|
+
const { orderBy, conditions: optsExpression, softDeletes = "exclude", pruneJoins = false, keepAliases = [] } = opts;
|
|
37
|
+
const cb = new require_ConditionBuilder.ConditionBuilder();
|
|
38
|
+
const aliasBindings = /* @__PURE__ */ new Map();
|
|
39
|
+
const aliases = {};
|
|
40
|
+
function getAlias(tableName) {
|
|
41
|
+
const abbrev = require_utils.abbreviation(tableName);
|
|
42
|
+
const i = aliases[abbrev] || 0;
|
|
43
|
+
aliases[abbrev] = i + 1;
|
|
44
|
+
return i === 0 ? abbrev : `${abbrev}${i}`;
|
|
45
|
+
}
|
|
46
|
+
/** Adds a `deleted_at IS NULL` condition for `alias`, i.e. for the primary table or a collection join. */
|
|
47
|
+
function addSoftDeleteCondition(meta, alias, targetCb) {
|
|
48
|
+
if (filterSoftDeletes(meta, softDeletes)) {
|
|
49
|
+
const column = meta.allFields[require_EntityMetadata.getBaseMeta(meta).timestampFields.deletedAt].serde?.columns[0];
|
|
50
|
+
targetCb.addSimpleCondition({
|
|
51
|
+
kind: "column",
|
|
52
|
+
alias,
|
|
53
|
+
column: column.columnName,
|
|
54
|
+
dbType: column.dbType,
|
|
55
|
+
cond: { kind: "is-null" },
|
|
56
|
+
pruneable: true
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function addTable(meta, alias, join, col1, col2, filter, fieldName, targetCb = cb, isCollection = false) {
|
|
61
|
+
const scopeFilter = require_scopes.isScope(filter);
|
|
62
|
+
const ef = scopeFilter ? void 0 : parseEntityFilter(meta, filter);
|
|
63
|
+
if (!scopeFilter && !ef && join !== "primary" && !require_Aliases.isAlias(filter)) return;
|
|
64
|
+
if (join === "primary") {
|
|
65
|
+
tables.push({
|
|
66
|
+
alias,
|
|
67
|
+
table: meta.tableName,
|
|
68
|
+
join
|
|
69
|
+
});
|
|
70
|
+
addTablePerClassJoinsAndClassTag({
|
|
71
|
+
selects,
|
|
72
|
+
tables,
|
|
73
|
+
orderBys
|
|
74
|
+
}, meta, alias, true);
|
|
75
|
+
} else if (meta.inheritanceType === "cti" && fieldName && !(fieldName in meta.fields)) meta.baseTypes.forEach((bt, i) => {
|
|
76
|
+
tables.push({
|
|
77
|
+
alias: `${alias}_b${i}`,
|
|
78
|
+
table: bt.tableName,
|
|
79
|
+
join: "outer",
|
|
80
|
+
col1,
|
|
81
|
+
col2: `${require_keywords.kq(`${alias}_b${i}`)}.${col2.split(".")[1]}`,
|
|
82
|
+
distinct: false
|
|
83
|
+
});
|
|
84
|
+
tables.push({
|
|
85
|
+
alias: `${alias}`,
|
|
86
|
+
table: meta.tableName,
|
|
87
|
+
join: "outer",
|
|
88
|
+
col1: require_keywords.kqDot(alias, "id"),
|
|
89
|
+
col2: require_keywords.kqDot(`${alias}_b${i}`, "id"),
|
|
90
|
+
distinct: false
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
else if (join === "lateral" || join === "cross") require_utils.fail("Unexpected lateral join");
|
|
94
|
+
else {
|
|
95
|
+
tables.push({
|
|
96
|
+
alias,
|
|
97
|
+
table: meta.tableName,
|
|
98
|
+
join,
|
|
99
|
+
col1,
|
|
100
|
+
col2
|
|
101
|
+
});
|
|
102
|
+
addTablePerClassJoinsAndClassTag({
|
|
103
|
+
selects,
|
|
104
|
+
tables,
|
|
105
|
+
orderBys
|
|
106
|
+
}, meta, alias, false);
|
|
107
|
+
}
|
|
108
|
+
if (needsStiDiscriminator(meta)) addStiSubtypeFilter(targetCb, meta, alias);
|
|
109
|
+
if (join === "primary" || isCollection) addSoftDeleteCondition(meta, alias, targetCb);
|
|
110
|
+
if (filter && typeof filter === "object" && "as" in filter && require_Aliases.isAlias(filter.as)) aliasBindings.set(require_Aliases.getAliasMgmt(filter.as), {
|
|
111
|
+
meta,
|
|
112
|
+
alias
|
|
113
|
+
});
|
|
114
|
+
else if (require_Aliases.isAlias(filter)) aliasBindings.set(require_Aliases.getAliasMgmt(filter), {
|
|
115
|
+
meta,
|
|
116
|
+
alias
|
|
117
|
+
});
|
|
118
|
+
addFilterAt(meta, alias, filter, targetCb, ef, join);
|
|
119
|
+
}
|
|
120
|
+
function addFilterAt(meta, tableAlias, filter, targetCb, parsed = parseEntityFilter(meta, filter), parentJoin = "primary") {
|
|
121
|
+
if (require_scopes.isScope(filter)) addScopeFilterAt(meta, tableAlias, filter, targetCb, parentJoin);
|
|
122
|
+
else if (parsed && parsed.kind === "join") addSubFilter(meta, tableAlias, parsed.subFilter, targetCb, parentJoin);
|
|
123
|
+
else if (parsed) {
|
|
124
|
+
const column = meta.fields["id"].serde.columns[0];
|
|
125
|
+
targetCb.addValueFilter(tableAlias, column, parsed);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function addScopeFilterAt(meta, tableAlias, scope, targetCb, parentJoin) {
|
|
129
|
+
for (const fragment of require_scopes.resolveScope(scope).fragments) if (fragment.kind === "filter") addFilterAt(meta, tableAlias, fragment.filter, targetCb, void 0, parentJoin);
|
|
130
|
+
else {
|
|
131
|
+
const a = require_Aliases.alias(meta.cstr);
|
|
132
|
+
const result = fragment.fn(a);
|
|
133
|
+
aliasBindings.set(require_Aliases.getAliasMgmt(a), {
|
|
134
|
+
meta,
|
|
135
|
+
alias: tableAlias
|
|
136
|
+
});
|
|
137
|
+
if (require_scopes.isScopeJoinFilter(result)) {
|
|
138
|
+
addFilterAt(meta, tableAlias, result.where, targetCb, void 0, parentJoin);
|
|
139
|
+
checkDomainCondition(result.conditions);
|
|
140
|
+
targetCb.maybeAddExpression(result.conditions);
|
|
141
|
+
} else {
|
|
142
|
+
const conditions = Array.isArray(result) ? result : [result];
|
|
143
|
+
for (const condition of conditions) checkDomainCondition(condition);
|
|
144
|
+
if (conditions.length > 0) targetCb.maybeAddExpression({ and: conditions });
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function addSubFilter(meta, tableAlias, subFilter, targetCb, parentJoin) {
|
|
149
|
+
Object.keys(subFilter).forEach((key) => {
|
|
150
|
+
if (key === "as") return;
|
|
151
|
+
if (key === "and" || key === "or") {
|
|
152
|
+
addLogicalFilter(meta, tableAlias, key, subFilter[key], targetCb, parentJoin);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const field = findFilterField(meta, key) ?? require_utils.fail(`Field '${key}' not found on ${meta.tableName}`);
|
|
156
|
+
const fa = `${tableAlias}${field.aliasSuffix}`;
|
|
157
|
+
if (field.kind === "primitive" || field.kind === "primaryKey" || field.kind === "enum") {
|
|
158
|
+
const column = field.serde.columns[0];
|
|
159
|
+
parseValueFilter(subFilter[key]).forEach((filter) => {
|
|
160
|
+
targetCb.addValueFilter(fa, column, filter);
|
|
161
|
+
});
|
|
162
|
+
} else if (field.kind === "m2o") {
|
|
163
|
+
const column = field.serde.columns[0];
|
|
164
|
+
const sub = subFilter[key];
|
|
165
|
+
const joinKind = field.required && parentJoin !== "outer" ? "inner" : "outer";
|
|
166
|
+
if (require_Aliases.isAlias(sub)) {
|
|
167
|
+
const a = getAlias(field.otherMetadata().tableName);
|
|
168
|
+
addTable(field.otherMetadata(), a, joinKind, require_keywords.kqDot(fa, column.columnName), require_keywords.kqDot(a, "id"), sub, void 0, targetCb);
|
|
169
|
+
}
|
|
170
|
+
const f = parseEntityFilter(field.otherMetadata(), sub);
|
|
171
|
+
if (!f) {} else if (f.kind === "join") {
|
|
172
|
+
const a = getAlias(field.otherMetadata().tableName);
|
|
173
|
+
addTable(field.otherMetadata(), a, joinKind, require_keywords.kqDot(fa, column.columnName), require_keywords.kqDot(a, "id"), sub, void 0, targetCb);
|
|
174
|
+
} else targetCb.addValueFilter(fa, column, f);
|
|
175
|
+
} else if (field.kind === "poly") {
|
|
176
|
+
const f = parseEntityFilter(meta, subFilter[key]);
|
|
177
|
+
if (!f) {} else if (f.kind === "join") throw new Error("Joins through polys are not supported");
|
|
178
|
+
else if (f.kind === "eq" || f.kind === "ne") {
|
|
179
|
+
if (isNilIdValue(f.value)) return;
|
|
180
|
+
const comp = field.components.find((p) => {
|
|
181
|
+
const otherMeta = p.otherMetadata();
|
|
182
|
+
const cstr = require_configure.getConstructorFromTaggedId(f.value);
|
|
183
|
+
return otherMeta.cstr === cstr || otherMeta.baseType === cstr.name;
|
|
184
|
+
});
|
|
185
|
+
if (!comp) require_utils.fail(`Invalid tagged id passed to ${meta.type}.${key}: ${f.value}`);
|
|
186
|
+
const column = field.serde.columns.find((c) => c.columnName === comp.columnName);
|
|
187
|
+
targetCb.addValueFilter(fa, column, f);
|
|
188
|
+
} else if (f.kind === "is-null") field.components.forEach((comp) => {
|
|
189
|
+
const column = field.serde.columns.find((c) => c.columnName === comp.columnName);
|
|
190
|
+
targetCb.addSimpleCondition({
|
|
191
|
+
kind: "column",
|
|
192
|
+
alias: fa,
|
|
193
|
+
column: comp.columnName,
|
|
194
|
+
dbType: column.dbType,
|
|
195
|
+
cond: f
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
else if (f.kind === "not-null") {
|
|
199
|
+
const conditions = field.components.map((comp) => {
|
|
200
|
+
const column = field.serde.columns.find((c) => c.columnName === comp.columnName);
|
|
201
|
+
return {
|
|
202
|
+
kind: "column",
|
|
203
|
+
alias: fa,
|
|
204
|
+
column: comp.columnName,
|
|
205
|
+
dbType: column.dbType,
|
|
206
|
+
cond: { kind: "not-null" }
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
targetCb.addParsedExpression({
|
|
210
|
+
kind: "exp",
|
|
211
|
+
op: "or",
|
|
212
|
+
conditions
|
|
213
|
+
});
|
|
214
|
+
} else if (f.kind === "in") {
|
|
215
|
+
if (f.value.length === 0) {
|
|
216
|
+
targetCb.addValueFilter(fa, field.serde.columns[0], {
|
|
217
|
+
kind: "in",
|
|
218
|
+
value: []
|
|
219
|
+
});
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const idsByConstructor = (0, joist_utils.groupBy)(f.value, (id) => require_configure.getConstructorFromTaggedId(id).name);
|
|
223
|
+
const conditions = Object.entries(idsByConstructor).map(([cstrName, ids]) => {
|
|
224
|
+
const column = field.serde.columns.find((c) => c.otherMetadata().cstr.name === cstrName || c.otherMetadata().baseType === cstrName) ?? require_utils.fail(`Invalid tagged ids passed to ${meta.type}.${key}: ${ids}`);
|
|
225
|
+
return {
|
|
226
|
+
kind: "column",
|
|
227
|
+
alias: fa,
|
|
228
|
+
column: column.columnName,
|
|
229
|
+
dbType: column.dbType,
|
|
230
|
+
cond: mapToDb(column, {
|
|
231
|
+
kind: "in",
|
|
232
|
+
value: ids
|
|
233
|
+
})
|
|
234
|
+
};
|
|
235
|
+
});
|
|
236
|
+
targetCb.addParsedExpression({
|
|
237
|
+
kind: "exp",
|
|
238
|
+
op: "or",
|
|
239
|
+
conditions
|
|
240
|
+
});
|
|
241
|
+
} else throw new Error(`Filters on polys for ${f.kind} are not supported`);
|
|
242
|
+
} else if (field.kind === "o2o") {
|
|
243
|
+
const otherMeta = field.otherMetadata();
|
|
244
|
+
const a = getAlias(otherMeta.tableName);
|
|
245
|
+
const otherField = otherMeta.allFields[field.otherFieldName];
|
|
246
|
+
const otherColumn = otherField.kind === "poly" ? otherField.components.find((c) => c.otherMetadata() === meta || c.otherMetadata() === require_EntityMetadata.getBaseMeta(meta)).columnName : otherField.serde.columns[0].columnName;
|
|
247
|
+
addTable(field.otherMetadata(), a, "outer", require_keywords.kqDot(tableAlias, "id"), require_keywords.kqDot(a, otherColumn), subFilter[key], field.otherFieldName, targetCb);
|
|
248
|
+
} else if (field.kind === "o2m") {
|
|
249
|
+
const otherMeta = field.otherMetadata();
|
|
250
|
+
const otherField = otherMeta.allFields[field.otherFieldName];
|
|
251
|
+
let otherColumn = otherField.serde.columns[0].columnName;
|
|
252
|
+
if (otherField.kind === "poly") otherColumn = (otherField.components.find((c) => c.otherMetadata() === meta) ?? require_utils.fail(`No poly component found for ${otherField.fieldName}`)).columnName;
|
|
253
|
+
const isCtiBaseFk = otherMeta.inheritanceType === "cti" && field.otherFieldName && !(field.otherFieldName in otherMeta.fields);
|
|
254
|
+
const a = getAlias(otherMeta.tableName);
|
|
255
|
+
addTable(otherMeta, a, "outer", require_keywords.kqDot(tableAlias, "id"), require_keywords.kqDot(a, otherColumn), subFilter[key], field.otherFieldName, targetCb, true);
|
|
256
|
+
if (!isCtiBaseFk) {
|
|
257
|
+
const table = tables.find((t) => t.alias === a);
|
|
258
|
+
if (table && (table.join === "inner" || table.join === "outer")) table.collection = {
|
|
259
|
+
parentAlias: tableAlias,
|
|
260
|
+
rootAlias: a,
|
|
261
|
+
kind: "o2m"
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
} else if (field.kind === "m2m") {
|
|
265
|
+
const sub = subFilter[key];
|
|
266
|
+
const f = parseEntityFilter(field.otherMetadata(), sub);
|
|
267
|
+
if (!f && !require_Aliases.isAlias(sub)) return;
|
|
268
|
+
const ja = getAlias(field.joinTableName);
|
|
269
|
+
tables.push({
|
|
270
|
+
join: "outer",
|
|
271
|
+
alias: ja,
|
|
272
|
+
table: field.joinTableName,
|
|
273
|
+
col1: require_keywords.kqDot(tableAlias, "id"),
|
|
274
|
+
col2: require_keywords.kqDot(ja, field.columnNames[0]),
|
|
275
|
+
collection: {
|
|
276
|
+
parentAlias: tableAlias,
|
|
277
|
+
rootAlias: ja,
|
|
278
|
+
kind: "m2m"
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
if (require_Aliases.isAlias(sub) || f?.kind === "join" || filterSoftDeletes(field.otherMetadata(), softDeletes)) {
|
|
282
|
+
const a = getAlias(field.otherMetadata().tableName);
|
|
283
|
+
addTable(field.otherMetadata(), a, "outer", require_keywords.kqDot(ja, field.columnNames[1]), require_keywords.kqDot(a, "id"), sub, void 0, targetCb, true);
|
|
284
|
+
const table = tables.find((t) => t.alias === a);
|
|
285
|
+
if (table && (table.join === "inner" || table.join === "outer")) table.collection = {
|
|
286
|
+
parentAlias: ja,
|
|
287
|
+
rootAlias: ja,
|
|
288
|
+
kind: "m2m"
|
|
289
|
+
};
|
|
290
|
+
} else if (f) {
|
|
291
|
+
const otherMeta = field.otherMetadata();
|
|
292
|
+
const column = {
|
|
293
|
+
columnName: field.columnNames[1],
|
|
294
|
+
dbType: otherMeta.idDbType,
|
|
295
|
+
mapToDb(value) {
|
|
296
|
+
return value === null || isNilIdValue(value) ? value : require_keys.keyToNumber(otherMeta, require_keys.maybeResolveReferenceToId(value));
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
targetCb.addSimpleCondition({
|
|
300
|
+
kind: "column",
|
|
301
|
+
alias: ja,
|
|
302
|
+
column: field.columnNames[1],
|
|
303
|
+
dbType: otherMeta.idDbType,
|
|
304
|
+
cond: mapToDb(column, f)
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
} else if (field.kind === "m2mEnum") {
|
|
308
|
+
const ja = getAlias(field.joinTableName);
|
|
309
|
+
tables.push({
|
|
310
|
+
join: "outer",
|
|
311
|
+
alias: ja,
|
|
312
|
+
table: field.joinTableName,
|
|
313
|
+
col1: require_keywords.kqDot(tableAlias, "id"),
|
|
314
|
+
col2: require_keywords.kqDot(ja, field.columnNames[0]),
|
|
315
|
+
collection: {
|
|
316
|
+
parentAlias: tableAlias,
|
|
317
|
+
rootAlias: ja,
|
|
318
|
+
kind: "m2m"
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
const column = {
|
|
322
|
+
columnName: field.columnNames[1],
|
|
323
|
+
dbType: "int",
|
|
324
|
+
mapToDb(value) {
|
|
325
|
+
return value === null || value === void 0 ? value : field.enumDetailType.getByCode(value).id;
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
parseValueFilter(subFilter[key]).forEach((filter) => {
|
|
329
|
+
targetCb.addValueFilter(ja, column, filter);
|
|
330
|
+
});
|
|
331
|
+
} else throw new Error(`Unsupported field ${key}`);
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
function addLogicalFilter(meta, tableAlias, op, value, targetCb, parentJoin) {
|
|
335
|
+
const conditions = (Array.isArray(value) ? value : [value]).flatMap((filter) => {
|
|
336
|
+
const branchCb = new require_ConditionBuilder.ConditionBuilder();
|
|
337
|
+
addFilterAt(meta, tableAlias, filter, branchCb, void 0, parentJoin);
|
|
338
|
+
const condition = branchCb.toExpressionFilter();
|
|
339
|
+
return condition ? [condition] : [];
|
|
340
|
+
});
|
|
341
|
+
if (conditions.length > 0) targetCb.addParsedExpression({
|
|
342
|
+
kind: "exp",
|
|
343
|
+
op,
|
|
344
|
+
conditions
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
function addOrderBy(meta, alias, orderBy) {
|
|
348
|
+
const entries = Object.entries(orderBy);
|
|
349
|
+
if (entries.length === 0) return;
|
|
350
|
+
for (const [key, value] of entries) {
|
|
351
|
+
if (!value) continue;
|
|
352
|
+
const field = meta.allFields[key] ?? require_utils.fail(`${key} not found on ${meta.tableName}`);
|
|
353
|
+
if (field.kind === "primitive" || field.kind === "primaryKey" || field.kind === "enum") {
|
|
354
|
+
const column = field.serde.columns[0];
|
|
355
|
+
orderBys.push({
|
|
356
|
+
alias: `${alias}${field.aliasSuffix ?? ""}`,
|
|
357
|
+
column: column.columnName,
|
|
358
|
+
order: value
|
|
359
|
+
});
|
|
360
|
+
} else if (field.kind === "m2o") {
|
|
361
|
+
let table = tables.find((t) => t.table === field.otherMetadata().tableName);
|
|
362
|
+
if (table) {
|
|
363
|
+
addTablePerClassJoinsAndClassTag(query, field.otherMetadata(), table.alias, false);
|
|
364
|
+
addOrderBy(field.otherMetadata(), table.alias, value);
|
|
365
|
+
} else {
|
|
366
|
+
const table = field.otherMetadata().tableName;
|
|
367
|
+
const a = getAlias(table);
|
|
368
|
+
const column = field.serde.columns[0].columnName;
|
|
369
|
+
const fa = require_Aliases.getMaybeCtiAlias(meta, field, meta, alias);
|
|
370
|
+
tables.push({
|
|
371
|
+
alias: a,
|
|
372
|
+
table,
|
|
373
|
+
join: "outer",
|
|
374
|
+
col1: require_keywords.kqDot(fa, column),
|
|
375
|
+
col2: require_keywords.kqDot(a, "id"),
|
|
376
|
+
distinct: false
|
|
377
|
+
});
|
|
378
|
+
addTablePerClassJoinsAndClassTag(query, field.otherMetadata(), a, false);
|
|
379
|
+
addOrderBy(field.otherMetadata(), a, value);
|
|
380
|
+
}
|
|
381
|
+
} else throw new Error(`Unsupported field ${key}`);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
const alias$1 = getAlias(meta.tableName);
|
|
385
|
+
if (meta.hasLazyColumns) selects.push(...lazyExcludedSelects(meta, alias$1));
|
|
386
|
+
else selects.push(`${require_keywords.kq(alias$1)}.*`);
|
|
387
|
+
addTable(meta, alias$1, "primary", "n/a", "n/a", filter);
|
|
388
|
+
if (optsExpression) {
|
|
389
|
+
checkDomainCondition(optsExpression);
|
|
390
|
+
cb.maybeAddExpression(optsExpression);
|
|
391
|
+
}
|
|
392
|
+
Object.assign(query, { condition: cb.toExpressionFilter() });
|
|
393
|
+
resolveAliasConditions(query, aliasBindings);
|
|
394
|
+
if (query.tables.some((t) => t.join === "outer")) maybeAddIdNotNulls(query);
|
|
395
|
+
if (orderBy) {
|
|
396
|
+
if (Array.isArray(orderBy)) for (const ob of orderBy) addOrderBy(meta, alias$1, ob);
|
|
397
|
+
else addOrderBy(meta, alias$1, orderBy);
|
|
398
|
+
}
|
|
399
|
+
maybeAddOrderBy(query, meta, alias$1);
|
|
400
|
+
if (pruneJoins) require_QueryParser_pruning.pruneUnusedJoins(query, keepAliases);
|
|
401
|
+
return query;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Look for conditions doing `some_column IS NULL` in an outer join that
|
|
405
|
+
* need an `id IS NOT NULL` to make sure they don't match inadvertently on
|
|
406
|
+
* the child row simply not existing.
|
|
407
|
+
*
|
|
408
|
+
* Note: Instead of injecting an extra `id IS NOT NULL` condition, I had tried
|
|
409
|
+
* using all INNER JOINs and flipping joins to OUTER only if the user explicit
|
|
410
|
+
* had `id IS NULL` in their filter, but that didn't work for queries that wanted
|
|
411
|
+
* to do an `OR` across two different children (which queries both children being
|
|
412
|
+
* OUTER JOINs, and detecting that case seemed complicated).
|
|
413
|
+
*/
|
|
414
|
+
function maybeAddIdNotNulls(query) {
|
|
415
|
+
require_QueryVisitor.visitConditions(query, { visitCond(c) {
|
|
416
|
+
if (c.cond.kind !== "is-null" || c.column === "id" || c.pruneable) return c;
|
|
417
|
+
const table = query.tables.find((t) => t.alias === c.alias);
|
|
418
|
+
if (table && table.join === "outer") {
|
|
419
|
+
const meta = require_configure.getMetadataForTable(table.table);
|
|
420
|
+
return {
|
|
421
|
+
kind: "exp",
|
|
422
|
+
op: "and",
|
|
423
|
+
conditions: [c, {
|
|
424
|
+
kind: "column",
|
|
425
|
+
alias: c.alias,
|
|
426
|
+
column: "id",
|
|
427
|
+
dbType: meta.idDbType,
|
|
428
|
+
cond: { kind: "not-null" }
|
|
429
|
+
}]
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
return c;
|
|
433
|
+
} });
|
|
434
|
+
}
|
|
435
|
+
/** Returns the `a` from `"a".*`. */
|
|
436
|
+
function parseAlias(alias) {
|
|
437
|
+
return alias.split(".")[0].replaceAll(`"`, "");
|
|
438
|
+
}
|
|
439
|
+
/** Parses an entity filter, which could be "just an id", an array of ids, or a nested filter. */
|
|
440
|
+
function parseEntityFilter(meta, filter) {
|
|
441
|
+
if (filter === void 0) return;
|
|
442
|
+
else if (require_Aliases.isAlias(filter)) return;
|
|
443
|
+
else if (require_scopes.isScope(filter)) return {
|
|
444
|
+
kind: "join",
|
|
445
|
+
subFilter: {}
|
|
446
|
+
};
|
|
447
|
+
else if (filter === null) return { kind: "is-null" };
|
|
448
|
+
else if (typeof filter === "string" || typeof filter === "number") return {
|
|
449
|
+
kind: "eq",
|
|
450
|
+
value: filter
|
|
451
|
+
};
|
|
452
|
+
else if (typeof filter === "boolean") return filter ? { kind: "not-null" } : { kind: "is-null" };
|
|
453
|
+
else if (Array.isArray(filter)) return {
|
|
454
|
+
kind: "in",
|
|
455
|
+
value: filter.map((v) => {
|
|
456
|
+
return require_Entity.isEntity(v) ? v.idTaggedMaybe ?? nilIdValue(meta) : v;
|
|
457
|
+
})
|
|
458
|
+
};
|
|
459
|
+
else if (require_Entity.isEntity(filter)) return {
|
|
460
|
+
kind: "eq",
|
|
461
|
+
value: filter.idTaggedMaybe || nilIdValue(meta)
|
|
462
|
+
};
|
|
463
|
+
else if (typeof filter === "object") {
|
|
464
|
+
const keys = Object.keys(filter);
|
|
465
|
+
if (keys.length === 1 && keys[0] === "ne") {
|
|
466
|
+
const value = filter["ne"];
|
|
467
|
+
if (value === void 0) return;
|
|
468
|
+
else if (value === null) return { kind: "not-null" };
|
|
469
|
+
else if (typeof value === "string" || typeof value === "number") return {
|
|
470
|
+
kind: "ne",
|
|
471
|
+
value
|
|
472
|
+
};
|
|
473
|
+
else if (require_Entity.isEntity(value)) return {
|
|
474
|
+
kind: "ne",
|
|
475
|
+
value: value.idTaggedMaybe || nilIdValue(meta)
|
|
476
|
+
};
|
|
477
|
+
else throw new Error(`Unsupported "ne" value ${value}`);
|
|
478
|
+
}
|
|
479
|
+
if (keys.length === 1 && keys[0] === "id") {
|
|
480
|
+
const value = filter["id"];
|
|
481
|
+
if (value === void 0) return;
|
|
482
|
+
else if (value === null) return { kind: "is-null" };
|
|
483
|
+
else if (typeof value === "string" || typeof value === "number") return {
|
|
484
|
+
kind: "eq",
|
|
485
|
+
value
|
|
486
|
+
};
|
|
487
|
+
else if (require_Entity.isEntity(value)) return {
|
|
488
|
+
kind: "eq",
|
|
489
|
+
value: value.idTaggedMaybe || nilIdValue(meta)
|
|
490
|
+
};
|
|
491
|
+
else return parseValueFilter(value)[0];
|
|
492
|
+
}
|
|
493
|
+
const subFilter = {};
|
|
494
|
+
for (const [key, value] of Object.entries(filter)) if (value && typeof value === "object" && !(0, joist_utils.isPlainObject)(value) && "idTaggedMaybe" in value) subFilter[key] = value.idTaggedMaybe || nilIdValue(meta);
|
|
495
|
+
else subFilter[key] = value;
|
|
496
|
+
return {
|
|
497
|
+
kind: "join",
|
|
498
|
+
subFilter
|
|
499
|
+
};
|
|
500
|
+
} else throw new Error(`Unrecognized filter ${filter}`);
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* We use this value if users include new (id-less) entities as em.find conditions.
|
|
504
|
+
*
|
|
505
|
+
* The idea is that this condition would never be met, but we still want to do the em.find
|
|
506
|
+
* query in case it's in an `OR` clause that would match false, but some other part of the
|
|
507
|
+
* clause would match. I.e. instead of just skipping the DB query all together, which is
|
|
508
|
+
* also something we could consider doing.
|
|
509
|
+
*
|
|
510
|
+
* For int IDs we use -1, and for uuid IDs, we use the nil UUID value:
|
|
511
|
+
*
|
|
512
|
+
* https://en.wikipedia.org/wiki/Universally_unique_identifier#Nil_UUID
|
|
513
|
+
*/
|
|
514
|
+
function nilIdValue(meta) {
|
|
515
|
+
switch (meta.idDbType) {
|
|
516
|
+
case "int":
|
|
517
|
+
case "bigint": return -1;
|
|
518
|
+
case "uuid": return "00000000-0000-0000-0000-000000000000";
|
|
519
|
+
case "text": return "0";
|
|
520
|
+
default: return require_utils.assertNever(meta.idDbType);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
function isNilIdValue(value) {
|
|
524
|
+
return value === -1 || value === "00000000-0000-0000-0000-000000000000";
|
|
525
|
+
}
|
|
526
|
+
/** Finds a filter field by fieldName or generated fieldIdName. */
|
|
527
|
+
function findFilterField(meta, key) {
|
|
528
|
+
return meta.allFields[key] ?? meta.polyComponentFields?.[key] ?? Object.values(meta.allFields).find((field) => field.fieldIdName === key) ?? Object.values(meta.polyComponentFields ?? {}).find((field) => field.fieldIdName === key);
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Parses the many/hodgepodge (ergonomic!) patterns of value filters into a `ParsedValueFilter[]`.
|
|
532
|
+
*
|
|
533
|
+
* Note we return an array because filter might be a `ValueGraphQLFilter` that is allowed to have
|
|
534
|
+
* multiple conditions, i.e. `{ lt: 10, gt: 5 }`.
|
|
535
|
+
*/
|
|
536
|
+
function parseValueFilter(filter) {
|
|
537
|
+
if (filter === null) return [{ kind: "is-null" }];
|
|
538
|
+
else if (filter === void 0) return [];
|
|
539
|
+
else if (Array.isArray(filter)) return [{
|
|
540
|
+
kind: "in",
|
|
541
|
+
value: filter
|
|
542
|
+
}];
|
|
543
|
+
else if ((0, joist_utils.isPlainObject)(filter)) {
|
|
544
|
+
const keys = Object.keys(filter);
|
|
545
|
+
if (keys.length === 0) return [];
|
|
546
|
+
else if (keys.length === 2 && "op" in filter && "value" in filter) {
|
|
547
|
+
const { op, value } = filter;
|
|
548
|
+
if (shouldPruneValueFilter(op, value)) return [];
|
|
549
|
+
else if (value === null) return [{ kind: "is-null" }];
|
|
550
|
+
else return [{
|
|
551
|
+
kind: op,
|
|
552
|
+
value: value ?? null
|
|
553
|
+
}];
|
|
554
|
+
} else if (keys.length === 2 && "gte" in filter && "lte" in filter) {
|
|
555
|
+
const { gte, lte } = filter;
|
|
556
|
+
return [{
|
|
557
|
+
kind: "between",
|
|
558
|
+
value: [gte, lte]
|
|
559
|
+
}];
|
|
560
|
+
} else return Object.entries(filter).map(([key, value]) => {
|
|
561
|
+
if (shouldPruneValueFilter(key, value)) return;
|
|
562
|
+
switch (key) {
|
|
563
|
+
case "eq": if (value === null) return { kind: "is-null" };
|
|
564
|
+
else return {
|
|
565
|
+
kind: "eq",
|
|
566
|
+
value: filter[key]
|
|
567
|
+
};
|
|
568
|
+
case "ne": if (value === null) return { kind: "not-null" };
|
|
569
|
+
else return {
|
|
570
|
+
kind: "ne",
|
|
571
|
+
value: filter[key] ?? null
|
|
572
|
+
};
|
|
573
|
+
case "in":
|
|
574
|
+
case "nin":
|
|
575
|
+
case "gt":
|
|
576
|
+
case "gte":
|
|
577
|
+
case "lt":
|
|
578
|
+
case "lte":
|
|
579
|
+
case "like":
|
|
580
|
+
case "nlike":
|
|
581
|
+
case "ilike":
|
|
582
|
+
case "nilike":
|
|
583
|
+
case "regex":
|
|
584
|
+
case "nregex":
|
|
585
|
+
case "iregex":
|
|
586
|
+
case "niregex":
|
|
587
|
+
case "contains":
|
|
588
|
+
case "overlaps":
|
|
589
|
+
case "containedBy": return {
|
|
590
|
+
kind: key,
|
|
591
|
+
value: filter[key]
|
|
592
|
+
};
|
|
593
|
+
case "pathExists": return {
|
|
594
|
+
kind: "jsonPathExists",
|
|
595
|
+
value: filter[key]
|
|
596
|
+
};
|
|
597
|
+
case "pathIsTrue": return {
|
|
598
|
+
kind: "jsonPathPredicate",
|
|
599
|
+
value: filter[key]
|
|
600
|
+
};
|
|
601
|
+
case "search": return {
|
|
602
|
+
kind: "ilike",
|
|
603
|
+
value: makeLike(filter[key])
|
|
604
|
+
};
|
|
605
|
+
case "between": return {
|
|
606
|
+
kind: key,
|
|
607
|
+
value: filter[key]
|
|
608
|
+
};
|
|
609
|
+
default: throw new Error(`Unsupported value filter key ${key}`);
|
|
610
|
+
}
|
|
611
|
+
}).filter(require_EntityManager.isDefined);
|
|
612
|
+
} else return [{
|
|
613
|
+
kind: "eq",
|
|
614
|
+
value: filter
|
|
615
|
+
}];
|
|
616
|
+
}
|
|
617
|
+
/** Converts domain-level values like string ids/enums into their db equivalent. */
|
|
618
|
+
function mapToDb(column, filter) {
|
|
619
|
+
switch (filter.kind) {
|
|
620
|
+
case "eq":
|
|
621
|
+
case "gt":
|
|
622
|
+
case "gte":
|
|
623
|
+
case "ne":
|
|
624
|
+
case "lt":
|
|
625
|
+
case "lte":
|
|
626
|
+
case "like":
|
|
627
|
+
case "nlike":
|
|
628
|
+
case "ilike":
|
|
629
|
+
case "nilike":
|
|
630
|
+
case "regex":
|
|
631
|
+
case "nregex":
|
|
632
|
+
case "iregex":
|
|
633
|
+
case "niregex":
|
|
634
|
+
filter.value = column.mapToDb(filter.value);
|
|
635
|
+
return filter;
|
|
636
|
+
case "in":
|
|
637
|
+
if (column.isArray) return {
|
|
638
|
+
kind: "contains",
|
|
639
|
+
value: column.mapToDb(filter.value)
|
|
640
|
+
};
|
|
641
|
+
else filter.value = filter.value.map((v) => column.mapToDb(v));
|
|
642
|
+
return filter;
|
|
643
|
+
case "nin":
|
|
644
|
+
if (column.isArray) throw new Error("The nin operator is not supported on array columns yet");
|
|
645
|
+
else filter.value = filter.value.map((v) => column.mapToDb(v));
|
|
646
|
+
return filter;
|
|
647
|
+
case "contains":
|
|
648
|
+
case "ncontains":
|
|
649
|
+
case "overlaps":
|
|
650
|
+
case "noverlaps":
|
|
651
|
+
case "containedBy":
|
|
652
|
+
if (!(column.isArray || column.dbType === "jsonb")) throw new Error(`${filter.kind} is only unsupported on array or jsonb columns`);
|
|
653
|
+
if (column.isArray) filter.value = column.mapToDb(filter.value);
|
|
654
|
+
return filter;
|
|
655
|
+
case "between":
|
|
656
|
+
filter.value = [column.mapToDb(filter.value[0]), column.mapToDb(filter.value[1])];
|
|
657
|
+
return filter;
|
|
658
|
+
case "is-null":
|
|
659
|
+
case "not-null":
|
|
660
|
+
case "jsonPathExists":
|
|
661
|
+
case "jsonPathPredicate": return filter;
|
|
662
|
+
default: throw require_utils.assertNever(filter);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
/** Adds any user-configured default order, plus an "always order by id" for determinism. */
|
|
666
|
+
function maybeAddOrderBy(query, meta, alias) {
|
|
667
|
+
const { orderBys } = query;
|
|
668
|
+
if (meta.orderBy) {
|
|
669
|
+
const column = (meta.allFields[meta.orderBy] ?? require_utils.fail(`${meta.orderBy} not found on ${meta.tableName}`)).serde.columns[0].columnName;
|
|
670
|
+
if (!orderBys.find((o) => o.alias === alias && o.column === column)) orderBys.push({
|
|
671
|
+
alias,
|
|
672
|
+
column,
|
|
673
|
+
order: "ASC"
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
if (!orderBys.find((o) => o.alias === alias && o.column === "id")) orderBys.push({
|
|
677
|
+
alias,
|
|
678
|
+
column: "id",
|
|
679
|
+
order: "ASC"
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
function addTablePerClassJoinsAndClassTag(query, meta, alias, isPrimary) {
|
|
683
|
+
if (!needsClassPerTableJoins(meta)) return;
|
|
684
|
+
const { selects, tables } = query;
|
|
685
|
+
meta.baseTypes.forEach((bt, i) => {
|
|
686
|
+
if (isPrimary) selects.push(`${alias}_b${i}.*`);
|
|
687
|
+
tables.push({
|
|
688
|
+
alias: `${alias}_b${i}`,
|
|
689
|
+
table: bt.tableName,
|
|
690
|
+
join: "outer",
|
|
691
|
+
col1: require_keywords.kqDot(alias, "id"),
|
|
692
|
+
col2: `${alias}_b${i}.id`,
|
|
693
|
+
distinct: false
|
|
694
|
+
});
|
|
695
|
+
});
|
|
696
|
+
if (isPrimary) {
|
|
697
|
+
const stColumns = [];
|
|
698
|
+
meta.subTypes.forEach((st, i) => {
|
|
699
|
+
const stAlias = `${alias}_s${i}`;
|
|
700
|
+
selects.push(`${stAlias}.*`);
|
|
701
|
+
tables.push({
|
|
702
|
+
alias: stAlias,
|
|
703
|
+
table: st.tableName,
|
|
704
|
+
join: "outer",
|
|
705
|
+
col1: require_keywords.kqDot(alias, "id"),
|
|
706
|
+
col2: `${alias}_s${i}.id`,
|
|
707
|
+
distinct: false
|
|
708
|
+
});
|
|
709
|
+
for (const field of Object.values(st.fields)) if (field.fieldName !== "id" && field.serde) for (const c of field.serde?.columns) stColumns.push({
|
|
710
|
+
stAlias,
|
|
711
|
+
columnName: c.columnName
|
|
712
|
+
});
|
|
713
|
+
});
|
|
714
|
+
selects.push(`${require_keywords.kq(alias)}.id as id`);
|
|
715
|
+
Object.values((0, joist_utils.groupBy)(stColumns, (c) => c.columnName)).filter((columns) => columns.length > 1).forEach((columns) => {
|
|
716
|
+
const { columnName } = columns[0];
|
|
717
|
+
selects.push(`COALESCE(${columns.map((c) => `${c.stAlias}.${columnName}`).join(", ")}) as ${columnName}`);
|
|
718
|
+
});
|
|
719
|
+
const cases = meta.subTypes.map((st, i) => `WHEN ${alias}_s${i}.id IS NOT NULL THEN '${st.type}'`);
|
|
720
|
+
if (cases.length > 0) selects.push(`CASE ${cases.join(" ")} ELSE '_' END as __class`);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Builds the primary table's SELECT columns explicitly, i.e. excluding any `lazy` columns.
|
|
725
|
+
*
|
|
726
|
+
* Only used when `meta.hasLazyColumns` is true; otherwise callers keep their plain `alias.*`, so
|
|
727
|
+
* that entities without lazy columns emit byte-identical SQL to before this feature existed.
|
|
728
|
+
*/
|
|
729
|
+
function lazyExcludedSelects(meta, alias) {
|
|
730
|
+
const selects = [];
|
|
731
|
+
for (const field of Object.values(meta.fields)) {
|
|
732
|
+
if (!field.serde) continue;
|
|
733
|
+
if (field.kind === "primitive" && field.lazy) continue;
|
|
734
|
+
for (const column of field.serde.columns) selects.push(require_keywords.kqDot(alias, column.columnName));
|
|
735
|
+
}
|
|
736
|
+
return selects;
|
|
737
|
+
}
|
|
738
|
+
/** Rejects SQL predicates throughout a domain condition tree before optional-filter pruning. */
|
|
739
|
+
function checkDomainCondition(condition) {
|
|
740
|
+
if (!condition) return;
|
|
741
|
+
if (require_Expr.isDeferredCondition(condition) || require_conditions.predicateBrand in condition && condition[require_conditions.predicateBrand] === "sql") require_utils.fail("SQL predicates are only supported by em.query/em.execute; use alias(...) predicates in em.find and scopes.");
|
|
742
|
+
if ("and" in condition && condition.and) for (const child of condition.and) checkDomainCondition(child);
|
|
743
|
+
else if ("or" in condition && condition.or) for (const child of condition.or) checkDomainCondition(child);
|
|
744
|
+
}
|
|
745
|
+
/** Resolves every `DeferredAliasCondition` in `query` against the parse's alias bindings. */
|
|
746
|
+
function resolveAliasConditions(query, bindings) {
|
|
747
|
+
function resolve(handle) {
|
|
748
|
+
return bindings.get(handle) ?? require_utils.fail(`Alias for ${handle.tableName} is not bound to this query's join literal`);
|
|
749
|
+
}
|
|
750
|
+
function maybeResolve(c) {
|
|
751
|
+
return require_DeferredAlias.isDeferredAliasCondition(c) ? c[require_DeferredAlias.deferredAliasSym](resolve) : void 0;
|
|
752
|
+
}
|
|
753
|
+
require_QueryVisitor.visitConditions(query, {
|
|
754
|
+
visitCond: maybeResolve,
|
|
755
|
+
visitRaw: maybeResolve
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
function maybeAddNotSoftDeleted(conditions, meta, alias, softDeletes) {
|
|
759
|
+
if (filterSoftDeletes(meta, softDeletes)) {
|
|
760
|
+
const column = meta.allFields[require_EntityMetadata.getBaseMeta(meta).timestampFields.deletedAt].serde?.columns[0];
|
|
761
|
+
conditions.push({
|
|
762
|
+
kind: "column",
|
|
763
|
+
alias,
|
|
764
|
+
column: column.columnName,
|
|
765
|
+
dbType: column.dbType,
|
|
766
|
+
cond: { kind: "is-null" }
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function filterSoftDeletes(meta, softDeletes) {
|
|
771
|
+
return softDeletes === "exclude" && !!require_EntityMetadata.getBaseMeta(meta).timestampFields?.deletedAt && (meta.inheritanceType !== "cti" || meta.baseTypes.length === 0);
|
|
772
|
+
}
|
|
773
|
+
function getTables(query) {
|
|
774
|
+
let primary;
|
|
775
|
+
const joins = [];
|
|
776
|
+
const laterals = [];
|
|
777
|
+
const crosses = [];
|
|
778
|
+
for (const table of query.tables) if (table.join === "primary") primary = table;
|
|
779
|
+
else if (table.join === "lateral") laterals.push(table);
|
|
780
|
+
else if (table.join === "cross") crosses.push(table);
|
|
781
|
+
else joins.push(table);
|
|
782
|
+
return [
|
|
783
|
+
primary,
|
|
784
|
+
joins,
|
|
785
|
+
laterals,
|
|
786
|
+
crosses
|
|
787
|
+
];
|
|
788
|
+
}
|
|
789
|
+
function needsClassPerTableJoins(meta) {
|
|
790
|
+
return meta.inheritanceType === "cti" && (meta.subTypes.length > 0 || meta.baseTypes.length > 0);
|
|
791
|
+
}
|
|
792
|
+
function needsStiDiscriminator(meta) {
|
|
793
|
+
return meta.inheritanceType === "sti" && !meta.stiDiscriminatorField;
|
|
794
|
+
}
|
|
795
|
+
function addStiSubtypeFilter(cb, subtypeMeta, alias) {
|
|
796
|
+
const cond = stiSubtypeFilter(subtypeMeta, alias);
|
|
797
|
+
if (cond) cb.addSimpleCondition(cond);
|
|
798
|
+
}
|
|
799
|
+
/** The `type_id = X` discriminator condition for an STI subtype, shared by em.find and em.query. */
|
|
800
|
+
function stiSubtypeFilter(meta, alias) {
|
|
801
|
+
if (meta.inheritanceType !== "sti" || meta.stiDiscriminatorValue === void 0) return void 0;
|
|
802
|
+
const baseMeta = require_EntityMetadata.getBaseMeta(meta);
|
|
803
|
+
const column = baseMeta.fields[baseMeta.stiDiscriminatorField].serde?.columns[0];
|
|
804
|
+
return {
|
|
805
|
+
kind: "column",
|
|
806
|
+
alias,
|
|
807
|
+
column: column.columnName,
|
|
808
|
+
dbType: column.dbType,
|
|
809
|
+
cond: {
|
|
810
|
+
kind: "eq",
|
|
811
|
+
value: meta.stiDiscriminatorValue
|
|
812
|
+
},
|
|
813
|
+
pruneable: true
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
/** Converts a search term like `foo bar` into a SQL `like` pattern like `%foo%bar%`. */
|
|
817
|
+
function makeLike(search) {
|
|
818
|
+
return search ? `%${search.replace(/\s+/g, "%")}%` : void 0;
|
|
819
|
+
}
|
|
820
|
+
/** Returns true for values that should be treated like an omitted filter. */
|
|
821
|
+
function shouldPruneValueFilter(key, value) {
|
|
822
|
+
if (value === void 0) return true;
|
|
823
|
+
return value === false && key !== "eq" && key !== "ne";
|
|
824
|
+
}
|
|
825
|
+
//#endregion
|
|
826
|
+
exports.addTablePerClassJoinsAndClassTag = addTablePerClassJoinsAndClassTag;
|
|
827
|
+
exports.filterSoftDeletes = filterSoftDeletes;
|
|
828
|
+
exports.findFilterField = findFilterField;
|
|
829
|
+
exports.getTables = getTables;
|
|
830
|
+
exports.lazyExcludedSelects = lazyExcludedSelects;
|
|
831
|
+
exports.makeLike = makeLike;
|
|
832
|
+
exports.mapToDb = mapToDb;
|
|
833
|
+
exports.maybeAddIdNotNulls = maybeAddIdNotNulls;
|
|
834
|
+
exports.maybeAddNotSoftDeleted = maybeAddNotSoftDeleted;
|
|
835
|
+
exports.maybeAddOrderBy = maybeAddOrderBy;
|
|
836
|
+
exports.parseAlias = parseAlias;
|
|
837
|
+
exports.parseEntityFilter = parseEntityFilter;
|
|
838
|
+
exports.parseFindQuery = parseFindQuery;
|
|
839
|
+
exports.parseValueFilter = parseValueFilter;
|
|
840
|
+
exports.stiSubtypeFilter = stiSubtypeFilter;
|
|
841
|
+
|
|
842
|
+
//# sourceMappingURL=QueryParser.cjs.map
|