joist-core 2.4.0-next.4 → 2.4.0-next.40
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/BaseEntity.d.cts +3 -4
- package/build/BaseEntity.d.cts.map +1 -1
- package/build/BaseEntity.d.mts +3 -4
- package/build/BaseEntity.d.mts.map +1 -1
- package/build/Entity.d.cts +3 -4
- package/build/Entity.d.cts.map +1 -1
- package/build/Entity.d.mts +3 -4
- package/build/Entity.d.mts.map +1 -1
- package/build/EntityFields.d.cts +3 -4
- package/build/EntityFields.d.cts.map +1 -1
- package/build/EntityFields.d.mts +3 -4
- package/build/EntityFields.d.mts.map +1 -1
- package/build/EntityManager.cjs +64 -20
- package/build/EntityManager.cjs.map +1 -1
- package/build/EntityManager.d.cts +86 -53
- package/build/EntityManager.d.cts.map +1 -1
- package/build/EntityManager.d.mts +86 -53
- package/build/EntityManager.d.mts.map +1 -1
- package/build/EntityManager.js +64 -22
- package/build/EntityManager.js.map +1 -1
- package/build/EntityMetadata.cjs +0 -1
- package/build/EntityMetadata.cjs.map +1 -1
- package/build/EntityMetadata.d.cts +39 -36
- package/build/EntityMetadata.d.cts.map +1 -1
- package/build/EntityMetadata.d.mts +39 -36
- package/build/EntityMetadata.d.mts.map +1 -1
- package/build/EntityMetadata.js +0 -1
- package/build/EntityMetadata.js.map +1 -1
- package/build/EnumMetadata.d.cts +1 -2
- package/build/EnumMetadata.d.cts.map +1 -1
- package/build/EnumMetadata.d.mts +1 -2
- package/build/EnumMetadata.d.mts.map +1 -1
- package/build/IndexManager.cjs +23 -5
- package/build/IndexManager.cjs.map +1 -1
- package/build/IndexManager.d.cts +2 -3
- package/build/IndexManager.d.cts.map +1 -1
- package/build/IndexManager.d.mts +2 -3
- package/build/IndexManager.d.mts.map +1 -1
- package/build/IndexManager.js +23 -5
- package/build/IndexManager.js.map +1 -1
- package/build/InstanceData.cjs.map +1 -1
- package/build/InstanceData.d.cts +1 -2
- package/build/InstanceData.d.cts.map +1 -1
- package/build/InstanceData.d.mts +1 -2
- package/build/InstanceData.d.mts.map +1 -1
- package/build/InstanceData.js.map +1 -1
- package/build/PluginManager.cjs.map +1 -1
- package/build/PluginManager.d.cts +4 -4
- package/build/PluginManager.d.cts.map +1 -1
- package/build/PluginManager.d.mts +4 -4
- package/build/PluginManager.d.mts.map +1 -1
- package/build/PluginManager.js.map +1 -1
- package/build/RowData.d.cts +3 -4
- package/build/RowData.d.cts.map +1 -1
- package/build/RowData.d.mts +3 -4
- package/build/RowData.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.cjs.map +1 -1
- package/build/batchloaders/BatchLoader.d.cts +1 -2
- package/build/batchloaders/BatchLoader.d.cts.map +1 -1
- package/build/batchloaders/BatchLoader.d.mts +1 -2
- package/build/batchloaders/BatchLoader.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.js.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.cts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.mts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.cts +2 -3
- package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.mts +2 -3
- package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/populateBatchLoader.cjs +2 -2
- package/build/batchloaders/populateBatchLoader.d.cts +2 -3
- package/build/batchloaders/populateBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.mts +2 -3
- package/build/batchloaders/populateBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/populateBatchLoader.js +2 -2
- package/build/batchloaders/recursiveChildrenBatchLoader.cjs +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.js +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.cjs +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.js +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.cjs +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.js +1 -1
- package/build/changes.cjs.map +1 -1
- package/build/changes.d.cts +9 -10
- package/build/changes.d.cts.map +1 -1
- package/build/changes.d.mts +9 -10
- package/build/changes.d.mts.map +1 -1
- package/build/changes.js.map +1 -1
- package/build/config.cjs +75 -1
- package/build/config.cjs.map +1 -1
- package/build/config.d.cts +99 -17
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +99 -17
- package/build/config.d.mts.map +1 -1
- package/build/config.js +75 -1
- package/build/config.js.map +1 -1
- package/build/configure.cjs +6 -2
- package/build/configure.cjs.map +1 -1
- package/build/configure.d.cts +8 -9
- package/build/configure.d.cts.map +1 -1
- package/build/configure.d.mts +8 -9
- package/build/configure.d.mts.map +1 -1
- package/build/configure.js +6 -2
- package/build/configure.js.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.cts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.mts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.cts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.mts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.cts +4 -5
- package/build/dataloaders/findCountDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.mts +4 -5
- package/build/dataloaders/findCountDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findDataLoader.cjs +1 -1
- package/build/dataloaders/findDataLoader.d.cts +11 -12
- package/build/dataloaders/findDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findDataLoader.d.mts +11 -12
- package/build/dataloaders/findDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findDataLoader.js +1 -1
- package/build/dataloaders/findIdsDataLoader.d.cts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.mts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.cjs +6 -2
- package/build/dataloaders/findOrCreateDataLoader.cjs.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.cts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.mts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.js +7 -3
- package/build/dataloaders/findOrCreateDataLoader.js.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.cjs +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.cts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.mts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.js +1 -1
- package/build/dataloaders/lensDataLoader.d.cts +2 -3
- package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.mts +2 -3
- package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
- package/build/defaults.cjs +2 -2
- package/build/defaults.cjs.map +1 -1
- package/build/defaults.d.cts +7 -7
- package/build/defaults.d.cts.map +1 -1
- package/build/defaults.d.mts +7 -7
- package/build/defaults.d.mts.map +1 -1
- package/build/defaults.js +2 -2
- package/build/defaults.js.map +1 -1
- package/build/drivers/Driver.d.cts +2 -3
- package/build/drivers/Driver.d.cts.map +1 -1
- package/build/drivers/Driver.d.mts +2 -3
- package/build/drivers/Driver.d.mts.map +1 -1
- package/build/drivers/EntityWriter.d.cts +7 -7
- package/build/drivers/EntityWriter.d.cts.map +1 -1
- package/build/drivers/EntityWriter.d.mts +7 -7
- package/build/drivers/EntityWriter.d.mts.map +1 -1
- package/build/drivers/IdAssigner.cjs.map +1 -1
- package/build/drivers/IdAssigner.d.cts +5 -5
- package/build/drivers/IdAssigner.d.cts.map +1 -1
- package/build/drivers/IdAssigner.d.mts +5 -5
- package/build/drivers/IdAssigner.d.mts.map +1 -1
- package/build/drivers/IdAssigner.js.map +1 -1
- package/build/drivers/driverApi.d.cts +2 -3
- package/build/drivers/driverApi.d.cts.map +1 -1
- package/build/drivers/driverApi.d.mts +2 -3
- package/build/drivers/driverApi.d.mts.map +1 -1
- package/build/fields.cjs +1 -0
- package/build/fields.cjs.map +1 -1
- package/build/fields.d.cts +6 -7
- package/build/fields.d.cts.map +1 -1
- package/build/fields.d.mts +6 -7
- package/build/fields.d.mts.map +1 -1
- package/build/fields.js +1 -0
- package/build/fields.js.map +1 -1
- package/build/flush/FlushLock.cjs.map +1 -1
- package/build/flush/FlushLock.d.cts +1 -2
- package/build/flush/FlushLock.d.cts.map +1 -1
- package/build/flush/FlushLock.d.mts +1 -2
- package/build/flush/FlushLock.d.mts.map +1 -1
- package/build/flush/FlushLock.js.map +1 -1
- package/build/flush/JoinRows.cjs.map +1 -1
- package/build/flush/JoinRows.d.cts +5 -6
- package/build/flush/JoinRows.d.cts.map +1 -1
- package/build/flush/JoinRows.d.mts +5 -6
- package/build/flush/JoinRows.d.mts.map +1 -1
- package/build/flush/JoinRows.js.map +1 -1
- package/build/flush/PendingChanges.d.cts +5 -6
- package/build/flush/PendingChanges.d.cts.map +1 -1
- package/build/flush/PendingChanges.d.mts +5 -6
- package/build/flush/PendingChanges.d.mts.map +1 -1
- package/build/flush/Todo.d.cts +5 -6
- package/build/flush/Todo.d.cts.map +1 -1
- package/build/flush/Todo.d.mts +5 -6
- package/build/flush/Todo.d.mts.map +1 -1
- package/build/getProperties.d.cts +3 -4
- package/build/getProperties.d.cts.map +1 -1
- package/build/getProperties.d.mts +3 -4
- package/build/getProperties.d.mts.map +1 -1
- package/build/index.cjs +13 -8
- package/build/index.cjs.map +1 -1
- package/build/index.d.cts +19 -18
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +19 -18
- package/build/index.d.mts.map +1 -1
- package/build/index.js +13 -10
- package/build/index.js.map +1 -1
- package/build/json.cjs +3 -3
- package/build/json.d.cts +11 -11
- package/build/json.d.cts.map +1 -1
- package/build/json.d.mts +11 -11
- package/build/json.d.mts.map +1 -1
- package/build/json.js +3 -3
- package/build/keys.d.cts +27 -27
- package/build/keys.d.cts.map +1 -1
- package/build/keys.d.mts +27 -27
- package/build/keys.d.mts.map +1 -1
- package/build/loading/HintTree.d.cts +3 -4
- package/build/loading/HintTree.d.cts.map +1 -1
- package/build/loading/HintTree.d.mts +3 -4
- package/build/loading/HintTree.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.cjs.map +1 -1
- package/build/loading/IsLoadedCache.d.cts +2 -3
- package/build/loading/IsLoadedCache.d.cts.map +1 -1
- package/build/loading/IsLoadedCache.d.mts +2 -3
- package/build/loading/IsLoadedCache.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.js.map +1 -1
- package/build/loading/loadHints.cjs +1 -1
- package/build/loading/loadHints.d.cts +17 -17
- package/build/loading/loadHints.d.cts.map +1 -1
- package/build/loading/loadHints.d.mts +17 -17
- package/build/loading/loadHints.d.mts.map +1 -1
- package/build/loading/loadHints.js +1 -1
- package/build/loading/loadLens.d.cts +13 -13
- package/build/loading/loadLens.d.cts.map +1 -1
- package/build/loading/loadLens.d.mts +13 -13
- package/build/loading/loadLens.d.mts.map +1 -1
- package/build/loading/withLoaded.cjs +2 -2
- package/build/loading/withLoaded.d.cts +5 -6
- package/build/loading/withLoaded.d.cts.map +1 -1
- package/build/loading/withLoaded.d.mts +5 -6
- package/build/loading/withLoaded.d.mts.map +1 -1
- package/build/loading/withLoaded.js +2 -2
- package/build/logging/FactoryLogger.d.cts +3 -4
- package/build/logging/FactoryLogger.d.cts.map +1 -1
- package/build/logging/FactoryLogger.d.mts +3 -4
- package/build/logging/FactoryLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.cjs.map +1 -1
- package/build/logging/FieldLogger.d.cts +4 -5
- package/build/logging/FieldLogger.d.cts.map +1 -1
- package/build/logging/FieldLogger.d.mts +4 -5
- package/build/logging/FieldLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.js.map +1 -1
- package/build/logging/ReactionLogger.d.cts +7 -7
- package/build/logging/ReactionLogger.d.cts.map +1 -1
- package/build/logging/ReactionLogger.d.mts +7 -7
- package/build/logging/ReactionLogger.d.mts.map +1 -1
- package/build/newEntity.cjs.map +1 -1
- package/build/newEntity.d.cts +4 -5
- package/build/newEntity.d.cts.map +1 -1
- package/build/newEntity.d.mts +4 -5
- package/build/newEntity.d.mts.map +1 -1
- package/build/newEntity.js.map +1 -1
- package/build/newTestInstance.cjs +1 -0
- package/build/newTestInstance.cjs.map +1 -1
- package/build/newTestInstance.d.cts +21 -21
- package/build/newTestInstance.d.cts.map +1 -1
- package/build/newTestInstance.d.mts +21 -21
- package/build/newTestInstance.d.mts.map +1 -1
- package/build/newTestInstance.js +1 -0
- package/build/newTestInstance.js.map +1 -1
- package/build/normalizeHints.d.cts +7 -8
- package/build/normalizeHints.d.cts.map +1 -1
- package/build/normalizeHints.d.mts +7 -8
- package/build/normalizeHints.d.mts.map +1 -1
- package/build/nowUTC.d.cts +4 -5
- package/build/nowUTC.d.cts.map +1 -1
- package/build/nowUTC.d.mts +4 -5
- package/build/nowUTC.d.mts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.cts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.mts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -1
- package/build/plugins/PreloadPlugin.d.cts +3 -4
- package/build/plugins/PreloadPlugin.d.cts.map +1 -1
- package/build/plugins/PreloadPlugin.d.mts +3 -4
- package/build/plugins/PreloadPlugin.d.mts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.cts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.mts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
- package/build/preloading/canPreload.d.cts +1 -2
- package/build/preloading/canPreload.d.cts.map +1 -1
- package/build/preloading/canPreload.d.mts +1 -2
- package/build/preloading/canPreload.d.mts.map +1 -1
- package/build/preloading/partitionHint.cjs +1 -1
- package/build/preloading/partitionHint.d.cts +1 -2
- package/build/preloading/partitionHint.d.cts.map +1 -1
- package/build/preloading/partitionHint.d.mts +1 -2
- package/build/preloading/partitionHint.d.mts.map +1 -1
- package/build/preloading/partitionHint.js +1 -1
- package/build/queries/ConditionBuilder.d.cts +2 -2
- package/build/queries/ConditionBuilder.d.cts.map +1 -1
- package/build/queries/ConditionBuilder.d.mts +2 -2
- package/build/queries/ConditionBuilder.d.mts.map +1 -1
- package/build/queries/conditions.d.cts +11 -12
- package/build/queries/conditions.d.cts.map +1 -1
- package/build/queries/conditions.d.mts +11 -12
- package/build/queries/conditions.d.mts.map +1 -1
- package/build/queries/entityQueryUtils.d.cts +4 -5
- package/build/queries/entityQueryUtils.d.cts.map +1 -1
- package/build/queries/entityQueryUtils.d.mts +4 -5
- package/build/queries/entityQueryUtils.d.mts.map +1 -1
- package/build/queries/find/Aliases.d.cts +16 -16
- package/build/queries/find/Aliases.d.cts.map +1 -1
- package/build/queries/find/Aliases.d.mts +16 -16
- package/build/queries/find/Aliases.d.mts.map +1 -1
- package/build/queries/find/DeferredAlias.d.cts +5 -6
- package/build/queries/find/DeferredAlias.d.cts.map +1 -1
- package/build/queries/find/DeferredAlias.d.mts +5 -6
- package/build/queries/find/DeferredAlias.d.mts.map +1 -1
- package/build/queries/find/EntityFilter.d.cts +12 -13
- package/build/queries/find/EntityFilter.d.cts.map +1 -1
- package/build/queries/find/EntityFilter.d.mts +12 -13
- package/build/queries/find/EntityFilter.d.mts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.cts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.mts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.cts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.mts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -1
- package/build/queries/find/QueryParser.d.cts +18 -18
- package/build/queries/find/QueryParser.d.cts.map +1 -1
- package/build/queries/find/QueryParser.d.mts +18 -18
- package/build/queries/find/QueryParser.d.mts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.cts +2 -3
- package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.mts +2 -3
- package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
- package/build/queries/find/QueryVisitor.d.cts +4 -4
- package/build/queries/find/QueryVisitor.d.cts.map +1 -1
- package/build/queries/find/QueryVisitor.d.mts +4 -4
- package/build/queries/find/QueryVisitor.d.mts.map +1 -1
- package/build/queries/find/buildFindQuery.d.cts +3 -3
- package/build/queries/find/buildFindQuery.d.cts.map +1 -1
- package/build/queries/find/buildFindQuery.d.mts +3 -3
- package/build/queries/find/buildFindQuery.d.mts.map +1 -1
- package/build/queries/find/scopes.cjs.map +1 -1
- package/build/queries/find/scopes.d.cts +12 -13
- package/build/queries/find/scopes.d.cts.map +1 -1
- package/build/queries/find/scopes.d.mts +12 -13
- package/build/queries/find/scopes.d.mts.map +1 -1
- package/build/queries/find/scopes.js.map +1 -1
- package/build/queries/parsedConditions.d.cts +7 -8
- package/build/queries/parsedConditions.d.cts.map +1 -1
- package/build/queries/parsedConditions.d.mts +7 -8
- package/build/queries/parsedConditions.d.mts.map +1 -1
- package/build/queries/renderConditions.d.cts +3 -4
- package/build/queries/renderConditions.d.cts.map +1 -1
- package/build/queries/renderConditions.d.mts +3 -4
- package/build/queries/renderConditions.d.mts.map +1 -1
- package/build/queries/skipCondition.d.cts +1 -2
- package/build/queries/skipCondition.d.cts.map +1 -1
- package/build/queries/skipCondition.d.mts +1 -2
- package/build/queries/skipCondition.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.cjs.map +1 -1
- package/build/queries/sql/AliasAssigner.d.cts +1 -2
- package/build/queries/sql/AliasAssigner.d.cts.map +1 -1
- package/build/queries/sql/AliasAssigner.d.mts +1 -2
- package/build/queries/sql/AliasAssigner.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.js.map +1 -1
- package/build/queries/sql/Expr.d.cts +26 -27
- package/build/queries/sql/Expr.d.cts.map +1 -1
- package/build/queries/sql/Expr.d.mts +26 -27
- package/build/queries/sql/Expr.d.mts.map +1 -1
- package/build/queries/sql/JoinTree.d.cts +5 -5
- package/build/queries/sql/JoinTree.d.cts.map +1 -1
- package/build/queries/sql/JoinTree.d.mts +5 -5
- package/build/queries/sql/JoinTree.d.mts.map +1 -1
- package/build/queries/sql/Tables.d.cts +39 -39
- package/build/queries/sql/Tables.d.cts.map +1 -1
- package/build/queries/sql/Tables.d.mts +39 -39
- package/build/queries/sql/Tables.d.mts.map +1 -1
- package/build/queries/sql/custom.d.cts +14 -14
- package/build/queries/sql/custom.d.cts.map +1 -1
- package/build/queries/sql/custom.d.mts +14 -14
- package/build/queries/sql/custom.d.mts.map +1 -1
- package/build/queries/sql/execute.cjs +4 -9
- package/build/queries/sql/execute.cjs.map +1 -1
- package/build/queries/sql/execute.d.cts +45 -28
- package/build/queries/sql/execute.d.cts.map +1 -1
- package/build/queries/sql/execute.d.mts +45 -28
- package/build/queries/sql/execute.d.mts.map +1 -1
- package/build/queries/sql/execute.js +5 -10
- package/build/queries/sql/execute.js.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.cts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.mts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -1
- package/build/queries/sql/expressions/case.d.cts +10 -10
- package/build/queries/sql/expressions/case.d.cts.map +1 -1
- package/build/queries/sql/expressions/case.d.mts +10 -10
- package/build/queries/sql/expressions/case.d.mts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.cts +5 -6
- package/build/queries/sql/expressions/coalesce.d.cts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.mts +5 -6
- package/build/queries/sql/expressions/coalesce.d.mts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.cts +1 -2
- package/build/queries/sql/expressions/codecs.d.cts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.mts +1 -2
- package/build/queries/sql/expressions/codecs.d.mts.map +1 -1
- package/build/queries/sql/expressions/expression.d.cts +6 -6
- package/build/queries/sql/expressions/expression.d.cts.map +1 -1
- package/build/queries/sql/expressions/expression.d.mts +6 -6
- package/build/queries/sql/expressions/expression.d.mts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.cts +5 -6
- package/build/queries/sql/expressions/greatest.d.cts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.mts +5 -6
- package/build/queries/sql/expressions/greatest.d.mts.map +1 -1
- package/build/queries/sql/expressions/least.d.cts +5 -6
- package/build/queries/sql/expressions/least.d.cts.map +1 -1
- package/build/queries/sql/expressions/least.d.mts +5 -6
- package/build/queries/sql/expressions/least.d.mts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.cts +5 -6
- package/build/queries/sql/expressions/nullIf.d.cts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.mts +5 -6
- package/build/queries/sql/expressions/nullIf.d.mts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.cts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.mts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -1
- package/build/queries/sql/expressions/types.d.cts +11 -11
- package/build/queries/sql/expressions/types.d.cts.map +1 -1
- package/build/queries/sql/expressions/types.d.mts +11 -11
- package/build/queries/sql/expressions/types.d.mts.map +1 -1
- package/build/queries/sql/keywords.d.cts +4 -5
- package/build/queries/sql/keywords.d.cts.map +1 -1
- package/build/queries/sql/keywords.d.mts +4 -5
- package/build/queries/sql/keywords.d.mts.map +1 -1
- package/build/queries/sql/query.cjs +59 -23
- package/build/queries/sql/query.cjs.map +1 -1
- package/build/queries/sql/query.d.cts +108 -77
- package/build/queries/sql/query.d.cts.map +1 -1
- package/build/queries/sql/query.d.mts +108 -77
- package/build/queries/sql/query.d.mts.map +1 -1
- package/build/queries/sql/query.js +58 -23
- package/build/queries/sql/query.js.map +1 -1
- package/build/queries/unnest.d.cts +2 -3
- package/build/queries/unnest.d.cts.map +1 -1
- package/build/queries/unnest.d.mts +2 -3
- package/build/queries/unnest.d.mts.map +1 -1
- package/build/queries/valueFilters.d.cts +5 -6
- package/build/queries/valueFilters.d.cts.map +1 -1
- package/build/queries/valueFilters.d.mts +5 -6
- package/build/queries/valueFilters.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.cjs +168 -2
- package/build/reactivity/ReactionsManager.cjs.map +1 -1
- package/build/reactivity/ReactionsManager.d.cts +56 -4
- package/build/reactivity/ReactionsManager.d.cts.map +1 -1
- package/build/reactivity/ReactionsManager.d.mts +56 -4
- package/build/reactivity/ReactionsManager.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.js +169 -3
- package/build/reactivity/ReactionsManager.js.map +1 -1
- package/build/reactivity/reactiveHints.cjs +3 -3
- package/build/reactivity/reactiveHints.cjs.map +1 -1
- package/build/reactivity/reactiveHints.d.cts +18 -18
- package/build/reactivity/reactiveHints.d.cts.map +1 -1
- package/build/reactivity/reactiveHints.d.mts +18 -18
- package/build/reactivity/reactiveHints.d.mts.map +1 -1
- package/build/reactivity/reactiveHints.js +3 -3
- package/build/reactivity/reactiveHints.js.map +1 -1
- package/build/relations/AbstractPropertyImpl.cjs.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.cts +1 -2
- package/build/relations/AbstractPropertyImpl.d.cts.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.mts +1 -2
- package/build/relations/AbstractPropertyImpl.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.js.map +1 -1
- package/build/relations/AbstractRelationImpl.d.cts +1 -2
- package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
- package/build/relations/AbstractRelationImpl.d.mts +1 -2
- package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
- package/build/relations/AsyncProperty.cjs.map +1 -1
- package/build/relations/AsyncProperty.d.cts +5 -6
- package/build/relations/AsyncProperty.d.cts.map +1 -1
- package/build/relations/AsyncProperty.d.mts +5 -6
- package/build/relations/AsyncProperty.d.mts.map +1 -1
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs +3 -3
- package/build/relations/AsyncReactiveField.cjs.map +1 -1
- package/build/relations/AsyncReactiveField.d.cts +4 -5
- package/build/relations/AsyncReactiveField.d.cts.map +1 -1
- package/build/relations/AsyncReactiveField.d.mts +4 -5
- package/build/relations/AsyncReactiveField.d.mts.map +1 -1
- package/build/relations/AsyncReactiveField.js +3 -3
- package/build/relations/AsyncReactiveField.js.map +1 -1
- package/build/relations/Collection.d.cts +4 -5
- package/build/relations/Collection.d.cts.map +1 -1
- package/build/relations/Collection.d.mts +4 -5
- package/build/relations/Collection.d.mts.map +1 -1
- package/build/relations/CustomCollection.cjs.map +1 -1
- package/build/relations/CustomCollection.d.cts +3 -4
- package/build/relations/CustomCollection.d.cts.map +1 -1
- package/build/relations/CustomCollection.d.mts +3 -4
- package/build/relations/CustomCollection.d.mts.map +1 -1
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs.map +1 -1
- package/build/relations/CustomReference.d.cts +3 -4
- package/build/relations/CustomReference.d.cts.map +1 -1
- package/build/relations/CustomReference.d.mts +3 -4
- package/build/relations/CustomReference.d.mts.map +1 -1
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs.map +1 -1
- package/build/relations/EnumCollection.d.cts +5 -5
- package/build/relations/EnumCollection.d.cts.map +1 -1
- package/build/relations/EnumCollection.d.mts +5 -5
- package/build/relations/EnumCollection.d.mts.map +1 -1
- package/build/relations/EnumCollection.js.map +1 -1
- package/build/relations/LargeCollection.d.cts +1 -2
- package/build/relations/LargeCollection.d.cts.map +1 -1
- package/build/relations/LargeCollection.d.mts +1 -2
- package/build/relations/LargeCollection.d.mts.map +1 -1
- package/build/relations/LazyField.cjs +14 -0
- package/build/relations/LazyField.cjs.map +1 -1
- package/build/relations/LazyField.d.cts +13 -8
- package/build/relations/LazyField.d.cts.map +1 -1
- package/build/relations/LazyField.d.mts +13 -8
- package/build/relations/LazyField.d.mts.map +1 -1
- package/build/relations/LazyField.js +14 -0
- package/build/relations/LazyField.js.map +1 -1
- package/build/relations/ManyToManyCollection.cjs.map +1 -1
- package/build/relations/ManyToManyCollection.d.cts +2 -3
- package/build/relations/ManyToManyCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyCollection.d.mts +2 -3
- package/build/relations/ManyToManyCollection.d.mts.map +1 -1
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.cts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.mts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.cjs.map +1 -1
- package/build/relations/ManyToOneReference.d.cts +6 -7
- package/build/relations/ManyToOneReference.d.cts.map +1 -1
- package/build/relations/ManyToOneReference.d.mts +6 -7
- package/build/relations/ManyToOneReference.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs.map +1 -1
- package/build/relations/OneToManyCollection.d.cts +2 -3
- package/build/relations/OneToManyCollection.d.cts.map +1 -1
- package/build/relations/OneToManyCollection.d.mts +2 -3
- package/build/relations/OneToManyCollection.d.mts.map +1 -1
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.cts +2 -3
- package/build/relations/OneToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.mts +2 -3
- package/build/relations/OneToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs.map +1 -1
- package/build/relations/OneToOneReference.d.cts +7 -7
- package/build/relations/OneToOneReference.d.cts.map +1 -1
- package/build/relations/OneToOneReference.d.mts +7 -7
- package/build/relations/OneToOneReference.d.mts.map +1 -1
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs.map +1 -1
- package/build/relations/PolymorphicReference.d.cts +4 -5
- package/build/relations/PolymorphicReference.d.cts.map +1 -1
- package/build/relations/PolymorphicReference.d.mts +4 -5
- package/build/relations/PolymorphicReference.d.mts.map +1 -1
- package/build/relations/PolymorphicReference.js.map +1 -1
- package/build/relations/PropertySymbols.d.cts +1 -2
- package/build/relations/PropertySymbols.d.cts.map +1 -1
- package/build/relations/PropertySymbols.d.mts +1 -2
- package/build/relations/PropertySymbols.d.mts.map +1 -1
- package/build/relations/ReactiveField.cjs +2 -2
- package/build/relations/ReactiveField.cjs.map +1 -1
- package/build/relations/ReactiveField.d.cts +4 -5
- package/build/relations/ReactiveField.d.cts.map +1 -1
- package/build/relations/ReactiveField.d.mts +4 -5
- package/build/relations/ReactiveField.d.mts.map +1 -1
- package/build/relations/ReactiveField.js +2 -2
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs.map +1 -1
- package/build/relations/ReactiveGetter.d.cts +4 -5
- package/build/relations/ReactiveGetter.d.cts.map +1 -1
- package/build/relations/ReactiveGetter.d.mts +4 -5
- package/build/relations/ReactiveGetter.d.mts.map +1 -1
- package/build/relations/ReactiveGetter.js.map +1 -1
- package/build/relations/ReactiveManyToMany.cjs +1 -1
- package/build/relations/ReactiveManyToMany.cjs.map +1 -1
- package/build/relations/ReactiveManyToMany.d.cts +4 -5
- package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
- package/build/relations/ReactiveManyToMany.d.mts +4 -5
- package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
- package/build/relations/ReactiveManyToMany.js +1 -1
- package/build/relations/ReactiveManyToMany.js.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.cts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.mts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs +1 -1
- package/build/relations/ReactiveReference.cjs.map +1 -1
- package/build/relations/ReactiveReference.d.cts +5 -6
- package/build/relations/ReactiveReference.d.cts.map +1 -1
- package/build/relations/ReactiveReference.d.mts +5 -6
- package/build/relations/ReactiveReference.d.mts.map +1 -1
- package/build/relations/ReactiveReference.js +1 -1
- package/build/relations/ReactiveReference.js.map +1 -1
- package/build/relations/ReadOnlyCollection.d.cts +4 -5
- package/build/relations/ReadOnlyCollection.d.cts.map +1 -1
- package/build/relations/ReadOnlyCollection.d.mts +4 -5
- package/build/relations/ReadOnlyCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.cjs +3 -3
- package/build/relations/RecursiveCollection.cjs.map +1 -1
- package/build/relations/RecursiveCollection.d.cts +10 -10
- package/build/relations/RecursiveCollection.d.cts.map +1 -1
- package/build/relations/RecursiveCollection.d.mts +10 -10
- package/build/relations/RecursiveCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.js +3 -3
- package/build/relations/RecursiveCollection.js.map +1 -1
- package/build/relations/RecursiveCycleError.d.cts +2 -2
- package/build/relations/RecursiveCycleError.d.cts.map +1 -1
- package/build/relations/RecursiveCycleError.d.mts +2 -2
- package/build/relations/RecursiveCycleError.d.mts.map +1 -1
- package/build/relations/Reference.d.cts +5 -5
- package/build/relations/Reference.d.cts.map +1 -1
- package/build/relations/Reference.d.mts +5 -5
- package/build/relations/Reference.d.mts.map +1 -1
- package/build/relations/ReferenceSymbols.d.cts +1 -2
- package/build/relations/ReferenceSymbols.d.cts.map +1 -1
- package/build/relations/ReferenceSymbols.d.mts +1 -2
- package/build/relations/ReferenceSymbols.d.mts.map +1 -1
- package/build/relations/Relation.d.cts +3 -3
- package/build/relations/Relation.d.cts.map +1 -1
- package/build/relations/Relation.d.mts +3 -3
- package/build/relations/Relation.d.mts.map +1 -1
- package/build/relations/RelationSymbols.d.cts +2 -3
- package/build/relations/RelationSymbols.d.cts.map +1 -1
- package/build/relations/RelationSymbols.d.mts +2 -3
- package/build/relations/RelationSymbols.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.cjs.map +1 -1
- package/build/relations/hasAsyncMethod.d.cts +6 -6
- package/build/relations/hasAsyncMethod.d.cts.map +1 -1
- package/build/relations/hasAsyncMethod.d.mts +6 -6
- package/build/relations/hasAsyncMethod.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.d.cts +2 -2
- package/build/relations/hasManyDerived.d.cts.map +1 -1
- package/build/relations/hasManyDerived.d.mts +2 -2
- package/build/relations/hasManyDerived.d.mts.map +1 -1
- package/build/relations/hasManyThrough.d.cts +1 -2
- package/build/relations/hasManyThrough.d.cts.map +1 -1
- package/build/relations/hasManyThrough.d.mts +1 -2
- package/build/relations/hasManyThrough.d.mts.map +1 -1
- package/build/relations/hasOneDerived.d.cts +1 -2
- package/build/relations/hasOneDerived.d.cts.map +1 -1
- package/build/relations/hasOneDerived.d.mts +1 -2
- package/build/relations/hasOneDerived.d.mts.map +1 -1
- package/build/relations/hasOneThrough.d.cts +1 -2
- package/build/relations/hasOneThrough.d.cts.map +1 -1
- package/build/relations/hasOneThrough.d.mts +1 -2
- package/build/relations/hasOneThrough.d.mts.map +1 -1
- package/build/relations/hasProperty.cjs +2 -2
- package/build/relations/hasProperty.cjs.map +1 -1
- package/build/relations/hasProperty.d.cts +8 -8
- package/build/relations/hasProperty.d.cts.map +1 -1
- package/build/relations/hasProperty.d.mts +8 -8
- package/build/relations/hasProperty.d.mts.map +1 -1
- package/build/relations/hasProperty.js +2 -2
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/index.cjs +5 -5
- package/build/relations/index.js +5 -5
- package/build/relations/isCascadeDelete.d.cts +1 -2
- package/build/relations/isCascadeDelete.d.cts.map +1 -1
- package/build/relations/isCascadeDelete.d.mts +1 -2
- package/build/relations/isCascadeDelete.d.mts.map +1 -1
- package/build/resurrection.cjs +11 -1
- package/build/resurrection.cjs.map +1 -1
- package/build/resurrection.d.cts +5 -3
- package/build/resurrection.d.cts.map +1 -1
- package/build/resurrection.d.mts +5 -3
- package/build/resurrection.d.mts.map +1 -1
- package/build/resurrection.js +11 -2
- package/build/resurrection.js.map +1 -1
- package/build/rules.d.cts +20 -20
- package/build/rules.d.cts.map +1 -1
- package/build/rules.d.mts +20 -20
- package/build/rules.d.mts.map +1 -1
- package/build/runtimeConfig.d.cts +4 -5
- package/build/runtimeConfig.d.cts.map +1 -1
- package/build/runtimeConfig.d.mts +4 -5
- package/build/runtimeConfig.d.mts.map +1 -1
- package/build/serde/TypeInfo.d.cts +3 -4
- package/build/serde/TypeInfo.d.cts.map +1 -1
- package/build/serde/TypeInfo.d.mts +3 -4
- package/build/serde/TypeInfo.d.mts.map +1 -1
- package/build/serde/columns.d.cts +2 -3
- package/build/serde/columns.d.cts.map +1 -1
- package/build/serde/columns.d.mts +2 -3
- package/build/serde/columns.d.mts.map +1 -1
- package/build/serde/fieldSerde.d.cts +9 -9
- package/build/serde/fieldSerde.d.cts.map +1 -1
- package/build/serde/fieldSerde.d.mts +9 -9
- package/build/serde/fieldSerde.d.mts.map +1 -1
- package/build/serde/serde.d.cts +18 -19
- package/build/serde/serde.d.cts.map +1 -1
- package/build/serde/serde.d.mts +18 -19
- package/build/serde/serde.d.mts.map +1 -1
- package/build/serde/temporal.d.cts +5 -5
- package/build/serde/temporal.d.cts.map +1 -1
- package/build/serde/temporal.d.mts +5 -5
- package/build/serde/temporal.d.mts.map +1 -1
- package/build/serde/temporalMappers.d.cts +4 -5
- package/build/serde/temporalMappers.d.cts.map +1 -1
- package/build/serde/temporalMappers.d.mts +4 -5
- package/build/serde/temporalMappers.d.mts.map +1 -1
- package/build/transitions.cjs +89 -0
- package/build/transitions.cjs.map +1 -0
- package/build/transitions.d.cts +109 -0
- package/build/transitions.d.cts.map +1 -0
- package/build/transitions.d.mts +109 -0
- package/build/transitions.d.mts.map +1 -0
- package/build/transitions.js +84 -0
- package/build/transitions.js.map +1 -0
- package/build/trusted.d.cts +2 -3
- package/build/trusted.d.cts.map +1 -1
- package/build/trusted.d.mts +2 -3
- package/build/trusted.d.mts.map +1 -1
- package/build/typeMap.d.cts +17 -17
- package/build/typeMap.d.cts.map +1 -1
- package/build/typeMap.d.mts +17 -17
- package/build/typeMap.d.mts.map +1 -1
- package/build/upsert.d.cts +4 -4
- package/build/upsert.d.cts.map +1 -1
- package/build/upsert.d.mts +4 -4
- package/build/upsert.d.mts.map +1 -1
- package/build/utils.d.cts +27 -28
- package/build/utils.d.cts.map +1 -1
- package/build/utils.d.mts +27 -28
- package/build/utils.d.mts.map +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BatchLoader } from "./batchloaders/BatchLoader.mjs";
|
|
2
|
-
import { OptsOf, OrderOf } from "./typeMap.mjs";
|
|
2
|
+
import { OptsOf, OrderOf, TypeMap } from "./typeMap.mjs";
|
|
3
3
|
import { Collection } from "./relations/Collection.mjs";
|
|
4
4
|
import { lazyColumnLoadOperation } from "./relations/LazyField.mjs";
|
|
5
5
|
import { Reference } from "./relations/Reference.mjs";
|
|
@@ -13,10 +13,11 @@ import { ExpressionFilter, FindFilter, UniqueFilter } from "./queries/find/Entit
|
|
|
13
13
|
import { MaybePromise } from "./utils.mjs";
|
|
14
14
|
import { LoadHint, Loaded, New } from "./loading/loadHints.mjs";
|
|
15
15
|
import { ReactiveHint } from "./reactivity/reactiveHints.mjs";
|
|
16
|
+
import { ValidationError, ValidationRuleResult } from "./rules.mjs";
|
|
16
17
|
import { RowData } from "./RowData.mjs";
|
|
17
18
|
import { EntityMetadata } from "./EntityMetadata.mjs";
|
|
18
19
|
import { Lens } from "./loading/loadLens.mjs";
|
|
19
|
-
import { CheckSetQuery, EntityQuery, QueryArg, QueryJoinInput, QueryRow, QuerySelect, QuerySource, ResolvedJoins, SetOperand, SetQuery, SetQueryRow
|
|
20
|
+
import { CheckSetQuery, EntityQuery, QueryArg, QueryJoinInput, QueryRow, QuerySelect, QuerySource, QueryTable, ResolvedJoins, SetOperand, SetQuery, SetQueryRow } from "./queries/sql/query.mjs";
|
|
20
21
|
import { PreloadPlugin } from "./plugins/PreloadPlugin.mjs";
|
|
21
22
|
import { Driver } from "./drivers/Driver.mjs";
|
|
22
23
|
import { CheckMutation, ExecuteResult, MutationInput, MutationRow } from "./queries/sql/execute.mjs";
|
|
@@ -53,7 +54,7 @@ import DataLoader, { BatchLoadFn, Options } from "dataloader";
|
|
|
53
54
|
* Abstract entity types, like a base `Publisher` class that is marked `abstract`, cannot
|
|
54
55
|
* implement this and instead only have the `AbsEntityConstructor` type.
|
|
55
56
|
*/
|
|
56
|
-
interface EntityConstructor<T> {
|
|
57
|
+
export interface EntityConstructor<T> {
|
|
57
58
|
/** The pseudo-public constructor for entities; only the `EntityManager` should actually instantiate entities. */
|
|
58
59
|
new (em: EntityManager<any, any, any>): T;
|
|
59
60
|
tagName: any;
|
|
@@ -62,7 +63,7 @@ interface EntityConstructor<T> {
|
|
|
62
63
|
getInstanceData(entity: Entity): InstanceData;
|
|
63
64
|
}
|
|
64
65
|
/** Options for the auto-batchable `em.find` queries. */
|
|
65
|
-
interface FindFilterOptions<T extends Entity> {
|
|
66
|
+
export interface FindFilterOptions<T extends Entity> {
|
|
66
67
|
conditions?: ExpressionFilter;
|
|
67
68
|
orderBy?: OrderOf<T> | OrderOf<T>[];
|
|
68
69
|
limit?: number | undefined;
|
|
@@ -71,12 +72,12 @@ interface FindFilterOptions<T extends Entity> {
|
|
|
71
72
|
allowMultipleLeftJoins?: boolean;
|
|
72
73
|
optimizeJoinsToExists?: boolean;
|
|
73
74
|
}
|
|
74
|
-
interface FindGqlFilterOptions<T extends Entity> extends Omit<FindFilterOptions<T>, "limit" | "offset"> {
|
|
75
|
+
export interface FindGqlFilterOptions<T extends Entity> extends Omit<FindFilterOptions<T>, "limit" | "offset"> {
|
|
75
76
|
limit?: number | null | undefined;
|
|
76
77
|
offset?: number | null | undefined;
|
|
77
78
|
}
|
|
78
79
|
/** Options for the `findCount`. */
|
|
79
|
-
interface FindCountFilterOptions<T extends Entity> {
|
|
80
|
+
export interface FindCountFilterOptions<T extends Entity> {
|
|
80
81
|
conditions?: ExpressionFilter;
|
|
81
82
|
softDeletes?: "include" | "exclude";
|
|
82
83
|
allowMultipleLeftJoins?: boolean;
|
|
@@ -87,22 +88,40 @@ interface FindCountFilterOptions<T extends Entity> {
|
|
|
87
88
|
*
|
|
88
89
|
* I.e. this is more like "MaybeAbstractEntityConstructor".
|
|
89
90
|
*/
|
|
90
|
-
type MaybeAbstractEntityConstructor<T> = abstract new (em: EntityManager<any, any, any>, opts: any) => T;
|
|
91
|
+
export type MaybeAbstractEntityConstructor<T> = abstract new (em: EntityManager<any, any, any>, opts: any) => T;
|
|
91
92
|
/** Pulls the entity's id type out of a given entity type T. */
|
|
92
|
-
type IdOf<T> = T extends {
|
|
93
|
+
export type IdOf<T> = T extends {
|
|
93
94
|
id: infer I;
|
|
94
95
|
} ? I : never;
|
|
95
|
-
type TaggedId = string;
|
|
96
|
-
|
|
97
|
-
type
|
|
96
|
+
export type TaggedId = string;
|
|
97
|
+
/** Creation options for any registered entity type, since deep clones can include more than the root type. */
|
|
98
|
+
export type CloneOverrides = Partial<TypeMap[keyof TypeMap]["optsType"]>;
|
|
99
|
+
/** Skips entities using either a shared predicate or predicates for specific entity types. */
|
|
100
|
+
export type CloneSkipIf<E extends Entity = Entity> = ((original: E) => boolean) | { [K in keyof TypeMap]?: (original: TypeMap[K]["entityType"]) => boolean; };
|
|
101
|
+
/** Supplies creation options using either a shared callback or callbacks with type-specific options. */
|
|
102
|
+
export type CloneOverridesCallback<E extends Entity = Entity> = ((original: E) => CloneOverrides) | { [K in keyof TypeMap]?: (original: TypeMap[K]["entityType"]) => Partial<TypeMap[K]["optsType"]>; };
|
|
103
|
+
/** Customizes clones using either a shared callback or callbacks for specific entity types. */
|
|
104
|
+
export type ClonePostClone<E extends Entity = Entity> = ((original: E, clone: E) => void) | { [K in keyof TypeMap]?: (original: TypeMap[K]["entityType"], clone: TypeMap[K]["entityType"]) => void; };
|
|
105
|
+
export declare function isId(value: any): value is IdOf<unknown>;
|
|
106
|
+
export type EntityManagerHook = "beforeBegin" | "afterBegin" | "beforeCommit" | "afterCommit";
|
|
107
|
+
/** Options for EntityManager transaction hooks. */
|
|
108
|
+
export interface EntityManagerHookOptions {
|
|
109
|
+
/**
|
|
110
|
+
* Runs the transaction lifecycle even on write-less flushes. Defaults to false.
|
|
111
|
+
*
|
|
112
|
+
* The transaction still starts after pre-transaction reactivity and validation, or reuses an
|
|
113
|
+
* existing transaction. Like the hooks, this option persists across flushes and forks.
|
|
114
|
+
*/
|
|
115
|
+
forceTransaction?: boolean;
|
|
116
|
+
}
|
|
98
117
|
type HookFn<TX> = (em: EntityManager, txn: TX) => MaybePromise<any>;
|
|
99
|
-
type LoaderCache = Record<string, DataLoader<any, any>>;
|
|
100
|
-
interface TimestampFields {
|
|
118
|
+
export type LoaderCache = Record<string, DataLoader<any, any>>;
|
|
119
|
+
export interface TimestampFields {
|
|
101
120
|
updatedAt: string | undefined;
|
|
102
121
|
createdAt: string | undefined;
|
|
103
122
|
deletedAt: string | undefined;
|
|
104
123
|
}
|
|
105
|
-
type EntityManagerOpts<TX = unknown> = ({
|
|
124
|
+
export type EntityManagerOpts<TX = unknown> = ({
|
|
106
125
|
driver: Driver<TX>;
|
|
107
126
|
em?: undefined;
|
|
108
127
|
} | {
|
|
@@ -111,7 +130,7 @@ type EntityManagerOpts<TX = unknown> = ({
|
|
|
111
130
|
}) & {
|
|
112
131
|
preloadPlugin?: PreloadPlugin;
|
|
113
132
|
};
|
|
114
|
-
interface FlushOptions {
|
|
133
|
+
export interface FlushOptions {
|
|
115
134
|
/** Skip all validations, including reactive validations, when flushing */
|
|
116
135
|
skipValidation?: boolean;
|
|
117
136
|
}
|
|
@@ -122,8 +141,8 @@ interface FlushOptions {
|
|
|
122
141
|
* - `in-memory-writes` -- allows entity mutations and `em.flush` w/o a `COMMIT`
|
|
123
142
|
* - `writes` -- allows entity mutations and `em.flush` will `COMMIT` writes
|
|
124
143
|
*/
|
|
125
|
-
type EntityManagerMode = "read-only" | "in-memory-writes" | "writes";
|
|
126
|
-
type FindOperation = typeof findOperation | typeof findByUniqueOperation | typeof findCountOperation | typeof findIdsOperation | typeof lensOperation | typeof loadOperation | typeof manyToManyLoadOperation | typeof manyToManyFindOperation | typeof enumCollectionLoadOperation | typeof oneToManyLoadOperation | typeof oneToManyFindOperation | typeof oneToOneLoadOperation | typeof populateOperation | typeof recursiveChildrenOperation | typeof recursiveM2mOperation | typeof recursiveParentsOperation | typeof lazyColumnLoadOperation;
|
|
144
|
+
export type EntityManagerMode = "read-only" | "in-memory-writes" | "writes";
|
|
145
|
+
export type FindOperation = typeof findOperation | typeof findByUniqueOperation | typeof findCountOperation | typeof findIdsOperation | typeof lensOperation | typeof loadOperation | typeof manyToManyLoadOperation | typeof manyToManyFindOperation | typeof enumCollectionLoadOperation | typeof oneToManyLoadOperation | typeof oneToManyFindOperation | typeof oneToOneLoadOperation | typeof populateOperation | typeof recursiveChildrenOperation | typeof recursiveM2mOperation | typeof recursiveParentsOperation | typeof lazyColumnLoadOperation;
|
|
127
146
|
/**
|
|
128
147
|
* The EntityManager is the primary way nearly all code, i.e. anything that finds/creates/updates/deletes entities,
|
|
129
148
|
* will interact with the database.
|
|
@@ -144,7 +163,7 @@ type FindOperation = typeof findOperation | typeof findByUniqueOperation | typeo
|
|
|
144
163
|
* @typeParam Entity - the application's based entity type (i.e. with number ids or string ids)
|
|
145
164
|
* @typeParamTX - the application's Transaction type, i.e. `Knex`
|
|
146
165
|
*/
|
|
147
|
-
declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX extends unknown = unknown> {
|
|
166
|
+
export declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX extends unknown = unknown> {
|
|
148
167
|
#private;
|
|
149
168
|
readonly ctx: C;
|
|
150
169
|
driver: Driver<TX>;
|
|
@@ -207,7 +226,7 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
207
226
|
* Population runs after the query, using the same relation loaders as `em.populate`.
|
|
208
227
|
* This method is not batched: these are custom queries, too unique to batch.
|
|
209
228
|
*/
|
|
210
|
-
query<R>(q:
|
|
229
|
+
query<R>(q: QueryTable<R, any>): Promise<R[]>;
|
|
211
230
|
query<T extends Entity$1>(q: EntityQuery<T>): Promise<T[]>;
|
|
212
231
|
query<T extends Entity$1, const H extends LoadHint<T>>(q: EntityQuery<T>, options: {
|
|
213
232
|
populate: H;
|
|
@@ -222,7 +241,7 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
222
241
|
* reads retain query's decoding and permissions. Neither path flushes or repairs cached entities.
|
|
223
242
|
*/
|
|
224
243
|
execute<const M extends MutationInput>(statement: M & CheckMutation<M>): Promise<ExecuteResult<MutationRow<M>>>;
|
|
225
|
-
execute<R>(statement:
|
|
244
|
+
execute<R>(statement: QueryTable<R, any>): Promise<ExecuteResult<R>>;
|
|
226
245
|
execute<T extends Entity$1>(statement: EntityQuery<T>): Promise<ExecuteResult<T>>;
|
|
227
246
|
execute<const Q extends SetQuery<readonly SetOperand[]>>(statement: Q & CheckSetQuery<Q>): Promise<ExecuteResult<SetQueryRow<Q>>>;
|
|
228
247
|
execute<F extends QuerySource, const S extends QuerySelect = never, J extends QueryJoinInput = []>(statement: QueryArg<F, S, J, never>): Promise<ExecuteResult<QueryRow<S, ResolvedJoins<F, J>>>>;
|
|
@@ -366,8 +385,9 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
366
385
|
* @param opts - Options to control the clone behaviour
|
|
367
386
|
* @param deep - Populate hint of the nested tree of objects to clone
|
|
368
387
|
* @param skip - Keys that will be skipped in the clone
|
|
369
|
-
* @param skipIf -
|
|
370
|
-
* @param
|
|
388
|
+
* @param skipIf - Shared or per-type predicates that skip entities and their children
|
|
389
|
+
* @param overrides - Shared or per-type callbacks that supply creation options before defaults run
|
|
390
|
+
* @param postClone - Shared or per-type callbacks for any original/clone post-processing needed
|
|
371
391
|
* @returns The `Loaded` cloned entity or fails if the clone could not be made
|
|
372
392
|
*
|
|
373
393
|
* @example
|
|
@@ -393,8 +413,9 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
393
413
|
clone<T extends Entity$1, H extends LoadHint<T>, const K = ReactiveHint<T>>(entity: T, opts?: {
|
|
394
414
|
deep?: H;
|
|
395
415
|
skip?: K;
|
|
396
|
-
skipIf?:
|
|
397
|
-
|
|
416
|
+
skipIf?: CloneSkipIf<Entity$1>;
|
|
417
|
+
overrides?: CloneOverridesCallback<Entity$1>;
|
|
418
|
+
postClone?: ClonePostClone<Entity$1>;
|
|
398
419
|
}): Promise<Loaded<T, H>>;
|
|
399
420
|
/**
|
|
400
421
|
* Utility to clone an entity and its nested relations, as determined by a populate hint.
|
|
@@ -403,8 +424,9 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
403
424
|
* @param opts - Options to control the clone behaviour
|
|
404
425
|
* @param deep - Populate hint of the nested tree of objects to clone
|
|
405
426
|
* @param skip - Keys that will be skipped in the clone
|
|
406
|
-
* @param skipIf -
|
|
407
|
-
* @param
|
|
427
|
+
* @param skipIf - Shared or per-type predicates that skip entities and their children
|
|
428
|
+
* @param overrides - Shared or per-type callbacks that supply creation options before defaults run
|
|
429
|
+
* @param postClone - Shared or per-type callbacks for any original/clone post-processing needed
|
|
408
430
|
* @returns Array of `Loaded` cloned entities from the provided list or empty array if all are skipped
|
|
409
431
|
*
|
|
410
432
|
* @example
|
|
@@ -417,7 +439,7 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
417
439
|
*
|
|
418
440
|
* @example
|
|
419
441
|
* // This will duplicate the author's books, and assign them to a different author
|
|
420
|
-
* const duplicatedBooks = await em.clone(author.books.get, {
|
|
442
|
+
* const duplicatedBooks = await em.clone(author.books.get, { overrides: () => ({ author: author2 }) })
|
|
421
443
|
*
|
|
422
444
|
* @example
|
|
423
445
|
* // This will duplicate the author's books, but skip any book where the title includes `sea`
|
|
@@ -426,8 +448,9 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
426
448
|
clone<T extends Entity$1, H extends LoadHint<T>, const K = ReactiveHint<T>>(entities: readonly T[], opts?: {
|
|
427
449
|
deep?: H;
|
|
428
450
|
skip?: K;
|
|
429
|
-
skipIf?:
|
|
430
|
-
|
|
451
|
+
skipIf?: CloneSkipIf<Entity$1>;
|
|
452
|
+
overrides?: CloneOverridesCallback<Entity$1>;
|
|
453
|
+
postClone?: ClonePostClone<Entity$1>;
|
|
431
454
|
}): Promise<Loaded<T, H>[]>;
|
|
432
455
|
/**
|
|
433
456
|
* Merges multiple source entities into a target entity by updating all references that point
|
|
@@ -666,10 +689,14 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
666
689
|
recalc(entities: Entity[]): Promise<void>;
|
|
667
690
|
recalc(entity: Entity, reactionName: string): Promise<void>;
|
|
668
691
|
recalc(entities: Entity[], reactionName: string): Promise<void>;
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
692
|
+
/** Registers a hook to run before the transaction begins. */
|
|
693
|
+
beforeBegin(fn: HookFn<TX>, opts?: EntityManagerHookOptions): void;
|
|
694
|
+
/** Registers a hook to run after the transaction begins. */
|
|
695
|
+
afterBegin(fn: HookFn<TX>, opts?: EntityManagerHookOptions): void;
|
|
696
|
+
/** Registers a hook to run before the transaction commits. */
|
|
697
|
+
beforeCommit(fn: HookFn<TX>, opts?: EntityManagerHookOptions): void;
|
|
698
|
+
/** Registers a hook to run after the transaction commits. */
|
|
699
|
+
afterCommit(fn: HookFn<TX>, opts?: EntityManagerHookOptions): void;
|
|
673
700
|
/**
|
|
674
701
|
* Returns an EntityManager-scoped (i.e. request scoped) data loader.
|
|
675
702
|
*
|
|
@@ -763,7 +790,7 @@ declare class EntityManager<C = unknown, Entity$1 extends Entity = Entity, TX ex
|
|
|
763
790
|
get isFlushing(): boolean;
|
|
764
791
|
}
|
|
765
792
|
/** Provides an internal API to the `EntityManager`. */
|
|
766
|
-
interface EntityManagerInternalApi {
|
|
793
|
+
export interface EntityManagerInternalApi {
|
|
767
794
|
joinRows: (m2m: ManyToManyLike) => JoinRows;
|
|
768
795
|
/** Map of taggedId -> fieldName -> pending children, i.e. when `a1.books` later loads, add/remove b1. */
|
|
769
796
|
pendingPercolate: Map<string, Map<string, {
|
|
@@ -795,29 +822,35 @@ interface EntityManagerInternalApi {
|
|
|
795
822
|
pendingDeleteIds(type: MaybeAbstractEntityConstructor<Entity>): readonly IdType[];
|
|
796
823
|
setIsRefreshing(isRefreshing: boolean): void;
|
|
797
824
|
}
|
|
798
|
-
declare function getEmInternalApi(em: EntityManager): EntityManagerInternalApi;
|
|
799
|
-
declare function getDefaultEntityLimit(): number;
|
|
800
|
-
declare function setDefaultEntityLimit(limit: number): void;
|
|
801
|
-
declare function resetDefaultEntityLimit(): void;
|
|
802
|
-
declare function isKey(k: any): k is string;
|
|
825
|
+
export declare function getEmInternalApi(em: EntityManager): EntityManagerInternalApi;
|
|
826
|
+
export declare function getDefaultEntityLimit(): number;
|
|
827
|
+
export declare function setDefaultEntityLimit(limit: number): void;
|
|
828
|
+
export declare function resetDefaultEntityLimit(): void;
|
|
829
|
+
export declare function isKey(k: any): k is string;
|
|
803
830
|
/** Compares `a` to `b`, where `b` might be an id. */
|
|
804
|
-
declare function sameEntity(a: Entity | string | number | undefined, b: Entity | string | number | undefined): boolean;
|
|
831
|
+
export declare function sameEntity(a: Entity | string | number | undefined, b: Entity | string | number | undefined): boolean;
|
|
805
832
|
/** Compares the value `a` to `b`, with handling of new entities w/o ids assigned yet. */
|
|
806
|
-
declare function sameReference<T extends Entity>(a: Reference<any, T, any>, b: Reference<any, T, any>): boolean;
|
|
833
|
+
export declare function sameReference<T extends Entity>(a: Reference<any, T, any>, b: Reference<any, T, any>): boolean;
|
|
807
834
|
/** Thrown by `findOneOrFail`, 'load' & 'loadAll' if an entity is not found. */
|
|
808
|
-
declare class NotFoundError extends Error {}
|
|
835
|
+
export declare class NotFoundError extends Error {}
|
|
809
836
|
/** Thrown by `findOne` and `findOneOrFail` if more than one entity is found. */
|
|
810
|
-
declare class TooManyError extends Error {
|
|
837
|
+
export declare class TooManyError extends Error {
|
|
811
838
|
constructor(message: string);
|
|
812
839
|
}
|
|
813
|
-
|
|
814
|
-
declare function
|
|
815
|
-
declare function
|
|
816
|
-
declare function
|
|
817
|
-
declare function
|
|
818
|
-
declare function
|
|
840
|
+
/** Invokes a single validation rule, coercing its result/sync throws into a promise. */
|
|
841
|
+
export declare function invokeRule(entity: Entity, fn: (entity: any) => MaybePromise<ValidationRuleResult>): Promise<ValidationError[]>;
|
|
842
|
+
export declare function driverBeforeBegin<TXN>(em: EntityManager<any, any, TXN>, txn: TXN): Promise<unknown>;
|
|
843
|
+
export declare function driverAfterBegin<TXN>(em: EntityManager<any, any, TXN>, txn: TXN): Promise<unknown>;
|
|
844
|
+
export declare function driverBeforeCommit<TXN>(em: EntityManager<any, any, TXN>, txn: TXN): Promise<unknown>;
|
|
845
|
+
export declare function driverAfterCommit<TXN>(em: EntityManager<any, any, TXN>, txn: TXN): Promise<unknown>;
|
|
846
|
+
export declare function isDefined<T extends any>(param: T | undefined | null): param is T;
|
|
847
|
+
export declare function setLastNow(now: Date | undefined): void;
|
|
848
|
+
/** An error thrown by `em.flush` after a previous `em.flush` on the same EntityManager failed. */
|
|
849
|
+
export declare class FailedFlushError extends Error {
|
|
850
|
+
constructor(cause: unknown);
|
|
851
|
+
}
|
|
819
852
|
/** An error thrown when `em.mode === "read-only"` but entities are mutated/flushed. */
|
|
820
|
-
declare class ReadOnlyError extends Error {
|
|
853
|
+
export declare class ReadOnlyError extends Error {
|
|
821
854
|
constructor();
|
|
822
855
|
}
|
|
823
856
|
/**
|
|
@@ -826,10 +859,10 @@ declare class ReadOnlyError extends Error {
|
|
|
826
859
|
*
|
|
827
860
|
* See https://github.com/brianc/node-postgres/pull/2983
|
|
828
861
|
*/
|
|
829
|
-
declare function appendStack(err: unknown, dummy: Error): unknown;
|
|
830
|
-
declare function createRowFromEntityData(e: Entity, opts?: {
|
|
862
|
+
export declare function appendStack(err: unknown, dummy: Error): unknown;
|
|
863
|
+
export declare function createRowFromEntityData(e: Entity, opts?: {
|
|
831
864
|
preferOriginalData?: boolean;
|
|
832
865
|
}): Record<string, any>;
|
|
833
866
|
//#endregion
|
|
834
|
-
export {
|
|
867
|
+
export {};
|
|
835
868
|
//# sourceMappingURL=EntityManager.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityManager.d.mts","names":[],"sources":["../src/EntityManager.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EntityManager.d.mts","names":["EntityW","Entity"],"sources":["../src/EntityManager.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqKiB,kBAAkB;;OAE5B,IAAI,+BAA+B;EAKxC;EACA,UAAU;;EAGV,gBAAgB,QAAQ,SAAS;;;iBAIlB,kBAAkB,UAAU;EAC3C,aAAa;EACb,UAAU,QAAQ,KAAK,QAAQ;EAC/B;EACA;EACA;EACA;EACA;;iBAGe,qBAAqB,UAAU,gBAAgB,KAAK,kBAAkB;EACrF;EACA;;;iBAIe,uBAAuB,UAAU;EAChD,aAAa;EACb;EACA;EACA;;;;;;;YAQU,+BAA+B,mBAAmB,IAAI,8BAA8B,cAAc;;YAGlG,KAAK,KAAK;EAAY,UAAU;IAAM;YAEtC;;YAGA,iBAAiB,QAAQ,cAAc;;YAGvC,YAAY,UAAUA,SAAUA,YACtC,UAAU,oBACT,WAAW,YAAY,UAAU,QAAQ;;YAGpC,uBAAuB,UAAUA,SAAUA,YACjD,UAAU,MAAM,qBACf,WAAW,YAAY,UAAU,QAAQ,qBAAqB,QAAQ,QAAQ;;YAGzE,eAAe,UAAUA,SAAUA,YACzC,UAAU,GAAG,OAAO,iBACnB,WAAW,YAAY,UAAU,QAAQ,kBAAkB,OAAO,QAAQ;wBAEjE,KAAK,aAAa,SAAS;YAI/B;;iBAGK;;;;;;;EAOf;;KAGG,OAAO,OAAO,IAAI,eAAe,KAAK,OAAO;YAEtC,cAAc,eAAe;iBAExB;EACf;EACA;EACA;;YAGU,kBAAkB;EACxB,QAAQ,OAAO;EAAK;;EACpB;EAAoB,IAAI;;EACxB,gBAAgB;;iBAEL;;EAEf;;;;;;;;;YAUU;YAEA,uBACD,uBACA,+BACA,4BACA,0BACA,uBACA,uBACA,iCACA,iCACA,qCACA,gCACA,gCACA,+BACA,2BACA,oC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E,mBAAmB,KAAK,IAAI,wBAAwB,MAAM,KAAK,MAAM;wBAIrE,kBAAkB,KAAK,IAAI,wBAAwB,MAAM,KAAK,MAAM;wBA+OpE,UAAU,eAAe,OAAO,uBAAuB,SAAS;wBAoChE,WAAW,KAAK;;qBAyFnB,yBAAyB;EACpC,YAAY;;;qBAMD,sBAAsB;EACjC;;;;;;;;wBA0Bc,YAAY,cAAc,OAAO;wBAsBjC,wBAAwB,GAAG,QAAQ;EAAQ;IAAmC"}
|
package/build/EntityManager.js
CHANGED
|
@@ -2,15 +2,9 @@ import { BatchLoader } from "./batchloaders/BatchLoader.js";
|
|
|
2
2
|
import "./relations/Collection.js";
|
|
3
3
|
import { CustomCollection } from "./relations/CustomCollection.js";
|
|
4
4
|
import { CustomReference } from "./relations/CustomReference.js";
|
|
5
|
-
import { deepNormalizeHint } from "./normalizeHints.js";
|
|
6
|
-
import "./batchloaders/recursiveChildrenBatchLoader.js";
|
|
7
|
-
import "./batchloaders/recursiveM2mBatchLoader.js";
|
|
8
|
-
import "./batchloaders/recursiveParentsBatchLoader.js";
|
|
9
|
-
import { RecursiveCycleError } from "./relations/RecursiveCycleError.js";
|
|
10
|
-
import "./relations/RecursiveCollection.js";
|
|
11
|
-
import { followReverseHint } from "./reactivity/reactiveHints.js";
|
|
12
5
|
import { assertLoaded, isLoadedForPopulate } from "./loading/loadHints.js";
|
|
13
6
|
import { AsyncMethodPopulateSecret } from "./relations/hasAsyncMethod.js";
|
|
7
|
+
import { RecursiveCycleError } from "./relations/RecursiveCycleError.js";
|
|
14
8
|
import { AsyncPropertyImpl } from "./relations/AsyncProperty.js";
|
|
15
9
|
import { getField, setField } from "./fields.js";
|
|
16
10
|
import { keyToNumber, keyToTaggedId, tagId, toTaggedId } from "./keys.js";
|
|
@@ -26,13 +20,19 @@ import "./batchloaders/oneToOneBatchLoader.js";
|
|
|
26
20
|
import { ReactiveReferenceImpl } from "./relations/ReactiveReference.js";
|
|
27
21
|
import { OneToOneReferenceImpl } from "./relations/OneToOneReference.js";
|
|
28
22
|
import { PolymorphicReferenceImpl } from "./relations/PolymorphicReference.js";
|
|
23
|
+
import "./batchloaders/recursiveChildrenBatchLoader.js";
|
|
24
|
+
import "./batchloaders/recursiveM2mBatchLoader.js";
|
|
25
|
+
import "./batchloaders/recursiveParentsBatchLoader.js";
|
|
26
|
+
import "./relations/RecursiveCollection.js";
|
|
29
27
|
import "./relations/index.js";
|
|
30
28
|
import { assertNever, fail, failIfAnyRejected, getOrSet, groupBy, hasAnyKey, partition, toArray } from "./utils.js";
|
|
31
29
|
import { newEntity } from "./newEntity.js";
|
|
30
|
+
import { deepNormalizeHint } from "./normalizeHints.js";
|
|
31
|
+
import { followReverseHint } from "./reactivity/reactiveHints.js";
|
|
32
32
|
import "./typeMap.js";
|
|
33
33
|
import { ValidationErrors } from "./rules.js";
|
|
34
|
-
import { getConstructorFromTag, getConstructorFromTaggedId, getMetadataForType } from "./configure.js";
|
|
35
34
|
import { constraintNameToValidationError } from "./config.js";
|
|
35
|
+
import { getConstructorFromTag, getConstructorFromTaggedId, getMetadataForType } from "./configure.js";
|
|
36
36
|
import { getBaseAndSelfMetas, getBaseMeta, getBaseSelfAndSubMetas, getMetadata } from "./EntityMetadata.js";
|
|
37
37
|
import { runInTrustedContext } from "./trusted.js";
|
|
38
38
|
import { setAsyncDefaults, setSyncDefaults } from "./defaults.js";
|
|
@@ -50,7 +50,7 @@ import "./drivers/index.js";
|
|
|
50
50
|
import { FieldLogger, noopFieldLogger } from "./logging/FieldLogger.js";
|
|
51
51
|
import { ReactionLogger } from "./logging/ReactionLogger.js";
|
|
52
52
|
import "./plugins/PreloadPlugin.js";
|
|
53
|
-
import {
|
|
53
|
+
import { parseRootQuery } from "./queries/sql/query.js";
|
|
54
54
|
import { upsert } from "./upsert.js";
|
|
55
55
|
import { NoIdError, asConcreteCstr, getRelationEntries, getRelations, setOpts } from "./index.js";
|
|
56
56
|
import "./batchloaders/enumCollectionBatchLoader.js";
|
|
@@ -106,6 +106,8 @@ var EntityManager = class EntityManager {
|
|
|
106
106
|
#entitiesByTag = /* @__PURE__ */ new Map();
|
|
107
107
|
#indexManager = new IndexManager();
|
|
108
108
|
#isValidating = false;
|
|
109
|
+
/** The error that failed a previous `em.flush`, after which this EntityManager can't flush again. */
|
|
110
|
+
#flushError = void 0;
|
|
109
111
|
#findRestricted = false;
|
|
110
112
|
#pendingPercolate = /* @__PURE__ */ new Map();
|
|
111
113
|
#preloadedRelations = /* @__PURE__ */ new Map();
|
|
@@ -132,6 +134,7 @@ var EntityManager = class EntityManager {
|
|
|
132
134
|
beforeCommit: [],
|
|
133
135
|
afterCommit: []
|
|
134
136
|
};
|
|
137
|
+
#forceTransaction = false;
|
|
135
138
|
#preloader;
|
|
136
139
|
#fieldLogger = noopFieldLogger;
|
|
137
140
|
#isLoadedCache = new IsLoadedCache();
|
|
@@ -154,6 +157,7 @@ var EntityManager = class EntityManager {
|
|
|
154
157
|
beforeCommit: [...opts.em.#hooks.beforeCommit],
|
|
155
158
|
afterCommit: [...opts.em.#hooks.afterCommit]
|
|
156
159
|
};
|
|
160
|
+
this.#forceTransaction = opts.em.#forceTransaction;
|
|
157
161
|
opts.em.__api.pluginManager.cloneTo(pluginManager);
|
|
158
162
|
}
|
|
159
163
|
const em = this;
|
|
@@ -297,7 +301,7 @@ var EntityManager = class EntityManager {
|
|
|
297
301
|
this.#assertFindAllowed("query");
|
|
298
302
|
const em = this;
|
|
299
303
|
return (async function query() {
|
|
300
|
-
const plan =
|
|
304
|
+
const plan = parseRootQuery(q);
|
|
301
305
|
if (options?.populate && plan.output.kind !== "entity") fail("em.query populate requires an entity selection");
|
|
302
306
|
const { rows } = await em.driver.executeQuery(em, plan.sql, plan.bindings);
|
|
303
307
|
const result = plan.decodeRows(em, rows);
|
|
@@ -516,18 +520,22 @@ var EntityManager = class EntityManager {
|
|
|
516
520
|
return upsert(this, type, input);
|
|
517
521
|
}
|
|
518
522
|
async clone(entityOrArray, opts) {
|
|
519
|
-
const { deep = {}, skipIf, skip = {}, postClone } = opts ?? {};
|
|
523
|
+
const { deep = {}, skipIf, skip = {}, overrides, postClone } = opts ?? {};
|
|
520
524
|
const todo = /* @__PURE__ */ new Set();
|
|
521
525
|
const skipMap = /* @__PURE__ */ new WeakMap();
|
|
522
526
|
await crawl(todo, skipMap, Array.isArray(entityOrArray) ? entityOrArray : [entityOrArray], deep, {
|
|
523
|
-
skipIf,
|
|
527
|
+
skipIf: (entity) => invokeCloneCallback(skipIf, entity) ?? false,
|
|
524
528
|
skip
|
|
525
529
|
});
|
|
526
530
|
const deferredRelations = [];
|
|
531
|
+
const overrideMap = /* @__PURE__ */ new WeakMap();
|
|
527
532
|
const clones = [...todo].map((entity) => {
|
|
528
533
|
const skip = skipMap.get(entity) ?? [];
|
|
534
|
+
const override = invokeCloneCallback(overrides, entity) ?? {};
|
|
535
|
+
overrideMap.set(entity, override);
|
|
529
536
|
const meta = getMetadata(entity);
|
|
530
537
|
const copy = Object.fromEntries(Object.values(meta.allFields).map((f) => {
|
|
538
|
+
if (Object.hasOwn(override, f.fieldName)) return [f.fieldName, override[f.fieldName]];
|
|
531
539
|
if (skip.includes(f.fieldName)) return void 0;
|
|
532
540
|
switch (f.kind) {
|
|
533
541
|
case "primitive": if (!f.derived && !f.protected) return [f.fieldName, getField(entity, f.fieldName)];
|
|
@@ -557,11 +565,15 @@ var EntityManager = class EntityManager {
|
|
|
557
565
|
default: assertNever(f);
|
|
558
566
|
}
|
|
559
567
|
}).filter(isDefined));
|
|
560
|
-
return [entity, this.create(asConcreteCstr(meta.cstr),
|
|
568
|
+
return [entity, this.create(asConcreteCstr(meta.cstr), {
|
|
569
|
+
...copy,
|
|
570
|
+
...override
|
|
571
|
+
})];
|
|
561
572
|
});
|
|
562
573
|
const entityToClone = new Map(clones);
|
|
563
|
-
clones.forEach(([, clone]) => {
|
|
574
|
+
clones.forEach(([original, clone]) => {
|
|
564
575
|
getRelationEntries(clone).forEach(([fieldName, value]) => {
|
|
576
|
+
if (Object.hasOwn(overrideMap.get(original), fieldName)) return;
|
|
565
577
|
if (value instanceof ManyToOneReferenceImpl || value instanceof PolymorphicReferenceImpl || value instanceof ReactiveReferenceImpl) {
|
|
566
578
|
const existingIdOrEntity = getField(clone, fieldName);
|
|
567
579
|
const existing = isEntity(existingIdOrEntity) ? existingIdOrEntity : this.getEntity(existingIdOrEntity);
|
|
@@ -572,7 +584,7 @@ var EntityManager = class EntityManager {
|
|
|
572
584
|
deferredRelations.forEach(([source, fieldName, target]) => {
|
|
573
585
|
entityToClone.get(source)[fieldName].set(entityToClone.get(target));
|
|
574
586
|
});
|
|
575
|
-
if (postClone) await Promise.all(clones.map((
|
|
587
|
+
if (postClone) await Promise.all(clones.map((pair) => invokeCloneCallback(postClone, ...pair)));
|
|
576
588
|
return Array.isArray(entityOrArray) ? entityOrArray.filter((original) => entityToClone.has(original)).map((original) => entityToClone.get(original)) : clones[0] ? clones[0][1] : fail("no entities were cloned given the provided options");
|
|
577
589
|
}
|
|
578
590
|
/**
|
|
@@ -863,6 +875,7 @@ var EntityManager = class EntityManager {
|
|
|
863
875
|
}
|
|
864
876
|
async #flush(flushOptions = {}) {
|
|
865
877
|
if (this.mode === "read-only") throw new ReadOnlyError();
|
|
878
|
+
if (this.#flushError !== void 0) throw new FailedFlushError(this.#flushError);
|
|
866
879
|
const { skipValidation = false } = flushOptions;
|
|
867
880
|
this.#fl.startLock();
|
|
868
881
|
const allFlushedEntities = /* @__PURE__ */ new Set();
|
|
@@ -987,7 +1000,7 @@ var EntityManager = class EntityManager {
|
|
|
987
1000
|
await runValidation(entityTodos, joinRowTodos, !skipValidation);
|
|
988
1001
|
this.#rm.throwIfAnySuppressedTypeErrors();
|
|
989
1002
|
if (suppressedDefaultTypeErrors.length > 0) throw suppressedDefaultTypeErrors[0];
|
|
990
|
-
if (Object.keys(entityTodos).length > 0 || Object.keys(joinRowTodos).length > 0) {
|
|
1003
|
+
if (Object.keys(entityTodos).length > 0 || Object.keys(joinRowTodos).length > 0 || this.#rm.hasPendingCommitTransitions() || this.#forceTransaction) {
|
|
991
1004
|
await this.driver.transaction(this, async () => {
|
|
992
1005
|
do {
|
|
993
1006
|
if (Object.keys(entityTodos).length > 0 || Object.keys(joinRowTodos).length > 0) {
|
|
@@ -1018,6 +1031,7 @@ var EntityManager = class EntityManager {
|
|
|
1018
1031
|
await runCommitValidation(commitRuleTodos, commitRuleJoinRowTodos);
|
|
1019
1032
|
}
|
|
1020
1033
|
await beforeCommit(this.ctx, allFlushedEntities);
|
|
1034
|
+
await this.#rm.runCommitTransitions();
|
|
1021
1035
|
if (this.mode === "in-memory-writes") throw new InMemoryRollbackError();
|
|
1022
1036
|
});
|
|
1023
1037
|
await afterCommit(this.ctx, allFlushedEntities);
|
|
@@ -1037,12 +1051,13 @@ var EntityManager = class EntityManager {
|
|
|
1037
1051
|
this.#dataloaders = {};
|
|
1038
1052
|
this.#batchLoaders = {};
|
|
1039
1053
|
this.#preloadedRelations = /* @__PURE__ */ new Map();
|
|
1040
|
-
this.#rm.clear();
|
|
1041
1054
|
}
|
|
1042
1055
|
for (const e of createdThenDeleted) getInstanceData(e).fixupCreatedThenDeleted();
|
|
1043
1056
|
this.#merging?.clear();
|
|
1057
|
+
this.#rm.clear();
|
|
1044
1058
|
return [...allFlushedEntities].sort((a, b) => getInstanceData(a).entityIndex - getInstanceData(b).entityIndex);
|
|
1045
1059
|
} catch (e) {
|
|
1060
|
+
if (!(e instanceof InMemoryRollbackError)) this.#flushError = e;
|
|
1046
1061
|
if (e instanceof RecursiveCycleError) {
|
|
1047
1062
|
const entity = e.entities[0];
|
|
1048
1063
|
for (const meta of getBaseAndSelfMetas(getMetadata(entity))) {
|
|
@@ -1234,17 +1249,25 @@ var EntityManager = class EntityManager {
|
|
|
1234
1249
|
}));
|
|
1235
1250
|
await this.#rm.recalcPendingReactables("reactables");
|
|
1236
1251
|
}
|
|
1237
|
-
|
|
1252
|
+
/** Registers a hook to run before the transaction begins. */
|
|
1253
|
+
beforeBegin(fn, opts = {}) {
|
|
1238
1254
|
this.#hooks.beforeBegin.push(fn);
|
|
1255
|
+
this.#forceTransaction ||= opts.forceTransaction ?? false;
|
|
1239
1256
|
}
|
|
1240
|
-
|
|
1257
|
+
/** Registers a hook to run after the transaction begins. */
|
|
1258
|
+
afterBegin(fn, opts = {}) {
|
|
1241
1259
|
this.#hooks.afterBegin.push(fn);
|
|
1260
|
+
this.#forceTransaction ||= opts.forceTransaction ?? false;
|
|
1242
1261
|
}
|
|
1243
|
-
|
|
1262
|
+
/** Registers a hook to run before the transaction commits. */
|
|
1263
|
+
beforeCommit(fn, opts = {}) {
|
|
1244
1264
|
this.#hooks.beforeCommit.push(fn);
|
|
1265
|
+
this.#forceTransaction ||= opts.forceTransaction ?? false;
|
|
1245
1266
|
}
|
|
1246
|
-
|
|
1267
|
+
/** Registers a hook to run after the transaction commits. */
|
|
1268
|
+
afterCommit(fn, opts = {}) {
|
|
1247
1269
|
this.#hooks.afterCommit.push(fn);
|
|
1270
|
+
this.#forceTransaction ||= opts.forceTransaction ?? false;
|
|
1248
1271
|
}
|
|
1249
1272
|
/**
|
|
1250
1273
|
* Returns an EntityManager-scoped (i.e. request scoped) data loader.
|
|
@@ -1323,6 +1346,7 @@ var EntityManager = class EntityManager {
|
|
|
1323
1346
|
} else throw new Error("Unsupported override for setFieldLogging");
|
|
1324
1347
|
}
|
|
1325
1348
|
async [Symbol.asyncDispose]() {
|
|
1349
|
+
if (this.#flushError !== void 0) return;
|
|
1326
1350
|
await this.flush();
|
|
1327
1351
|
}
|
|
1328
1352
|
/** Returns entities matching the filter using indexed search when available. */
|
|
@@ -1748,6 +1772,18 @@ function recalcSynchronousDerivedFields(todos) {
|
|
|
1748
1772
|
}
|
|
1749
1773
|
}
|
|
1750
1774
|
}
|
|
1775
|
+
/** Invokes only the most specific handler, falling back to a base type when no concrete-type handler exists. */
|
|
1776
|
+
function invokeCloneCallback(callback, ...args) {
|
|
1777
|
+
if (typeof callback === "function") return callback(...args);
|
|
1778
|
+
if (!callback) return void 0;
|
|
1779
|
+
const handlers = callback;
|
|
1780
|
+
let meta = getMetadata(args[0]);
|
|
1781
|
+
while (meta) {
|
|
1782
|
+
const handler = Object.hasOwn(handlers, meta.type) ? handlers[meta.type] : void 0;
|
|
1783
|
+
if (handler) return handler(...args);
|
|
1784
|
+
meta = meta.baseType ? getMetadataForType(meta.baseType) : void 0;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1751
1787
|
/** Recursively crawls through `entity`, with the given populate `deep` hint, and adds anything found to `found`. */
|
|
1752
1788
|
async function crawl(found, skipMap, entities, deep, opts = {}) {
|
|
1753
1789
|
const { skipIf = () => false } = opts ?? {};
|
|
@@ -1858,6 +1894,12 @@ function hasPaginationSettings(options) {
|
|
|
1858
1894
|
}
|
|
1859
1895
|
/** An error we throw to get knex to `ROLLBACK`, but then catch. */
|
|
1860
1896
|
var InMemoryRollbackError = class extends Error {};
|
|
1897
|
+
/** An error thrown by `em.flush` after a previous `em.flush` on the same EntityManager failed. */
|
|
1898
|
+
var FailedFlushError = class extends Error {
|
|
1899
|
+
constructor(cause) {
|
|
1900
|
+
super("EntityManager cannot flush after a previous flush failed, use a new EntityManager", { cause });
|
|
1901
|
+
}
|
|
1902
|
+
};
|
|
1861
1903
|
/** An error thrown when `em.mode === "read-only"` but entities are mutated/flushed. */
|
|
1862
1904
|
var ReadOnlyError = class extends Error {
|
|
1863
1905
|
constructor() {
|
|
@@ -1908,6 +1950,6 @@ function createRowFromEntityData(e, opts = {}) {
|
|
|
1908
1950
|
return row;
|
|
1909
1951
|
}
|
|
1910
1952
|
//#endregion
|
|
1911
|
-
export { EntityManager, NotFoundError, ReadOnlyError, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow };
|
|
1953
|
+
export { EntityManager, FailedFlushError, NotFoundError, ReadOnlyError, TooManyError, appendStack, createRowFromEntityData, driverAfterBegin, driverAfterCommit, driverBeforeBegin, driverBeforeCommit, getDefaultEntityLimit, getEmInternalApi, invokeRule, isDefined, isId, isKey, resetDefaultEntityLimit, sameEntity, sameReference, setDefaultEntityLimit, setLastNow };
|
|
1912
1954
|
|
|
1913
1955
|
//# sourceMappingURL=EntityManager.js.map
|