joist-core 2.4.0 → 2.5.0
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 +102 -22
- package/build/EntityManager.cjs.map +1 -1
- package/build/EntityManager.d.cts +99 -54
- package/build/EntityManager.d.cts.map +1 -1
- package/build/EntityManager.d.mts +99 -54
- package/build/EntityManager.d.mts.map +1 -1
- package/build/EntityManager.js +102 -24
- 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 +47 -36
- package/build/EntityMetadata.d.cts.map +1 -1
- package/build/EntityMetadata.d.mts +47 -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 +25 -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 +25 -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.cjs +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/oneToManyBatchLoader.js +1 -1
- package/build/batchloaders/oneToOneBatchLoader.cjs +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/oneToOneBatchLoader.js +1 -1
- 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/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.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/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 +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 +1 -1
- package/build/changes.js.map +1 -1
- package/build/config.cjs +165 -26
- package/build/config.cjs.map +1 -1
- package/build/config.d.cts +111 -19
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +111 -19
- package/build/config.d.mts.map +1 -1
- package/build/config.js +165 -26
- package/build/config.js.map +1 -1
- package/build/configure.cjs +32 -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 +32 -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 +10 -12
- package/build/dataloaders/findPaginatedDataLoader.cjs.map +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 +10 -12
- package/build/dataloaders/findPaginatedDataLoader.js.map +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 +1 -1
- 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 +1 -1
- 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.cjs +4 -3
- package/build/drivers/EntityWriter.cjs.map +1 -1
- package/build/drivers/EntityWriter.d.cts +19 -7
- package/build/drivers/EntityWriter.d.cts.map +1 -1
- package/build/drivers/EntityWriter.d.mts +19 -7
- package/build/drivers/EntityWriter.d.mts.map +1 -1
- package/build/drivers/EntityWriter.js +5 -4
- package/build/drivers/EntityWriter.js.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 +12 -9
- package/build/fields.cjs.map +1 -1
- package/build/fields.d.cts +10 -11
- package/build/fields.d.cts.map +1 -1
- package/build/fields.d.mts +10 -11
- package/build/fields.d.mts.map +1 -1
- package/build/fields.js +12 -9
- 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/ReadDrift.cjs +90 -0
- package/build/flush/ReadDrift.cjs.map +1 -0
- package/build/flush/ReadDrift.d.cts +25 -0
- package/build/flush/ReadDrift.d.cts.map +1 -0
- package/build/flush/ReadDrift.d.mts +25 -0
- package/build/flush/ReadDrift.d.mts.map +1 -0
- package/build/flush/ReadDrift.js +87 -0
- package/build/flush/ReadDrift.js.map +1 -0
- 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.cjs +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/getProperties.js +1 -1
- package/build/index.cjs +20 -7
- package/build/index.cjs.map +1 -1
- package/build/index.d.cts +23 -19
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +23 -19
- package/build/index.d.mts.map +1 -1
- package/build/index.js +17 -10
- package/build/index.js.map +1 -1
- 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/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 +2 -2
- package/build/loading/IsLoadedCache.cjs.map +1 -1
- package/build/loading/IsLoadedCache.d.cts +3 -4
- package/build/loading/IsLoadedCache.d.cts.map +1 -1
- package/build/loading/IsLoadedCache.d.mts +3 -4
- package/build/loading/IsLoadedCache.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.js +2 -2
- package/build/loading/IsLoadedCache.js.map +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/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.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/logging/FactoryLogger.cjs +1 -1
- package/build/logging/FactoryLogger.cjs.map +1 -1
- 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/FactoryLogger.js +2 -2
- package/build/logging/FactoryLogger.js.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/metrics/EntityMetrics.cjs +81 -0
- package/build/metrics/EntityMetrics.cjs.map +1 -0
- package/build/metrics/EntityMetrics.d.cts +55 -0
- package/build/metrics/EntityMetrics.d.cts.map +1 -0
- package/build/metrics/EntityMetrics.d.mts +55 -0
- package/build/metrics/EntityMetrics.d.mts.map +1 -0
- package/build/metrics/EntityMetrics.js +79 -0
- package/build/metrics/EntityMetrics.js.map +1 -0
- package/build/newEntity.cjs +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 +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.cjs +38 -0
- package/build/queries/sql/Expr.cjs.map +1 -1
- package/build/queries/sql/Expr.d.cts +45 -27
- package/build/queries/sql/Expr.d.cts.map +1 -1
- package/build/queries/sql/Expr.d.mts +45 -27
- package/build/queries/sql/Expr.d.mts.map +1 -1
- package/build/queries/sql/Expr.js +38 -1
- package/build/queries/sql/Expr.js.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.cjs +9 -0
- package/build/queries/sql/Tables.cjs.map +1 -1
- package/build/queries/sql/Tables.d.cts +46 -39
- package/build/queries/sql/Tables.d.cts.map +1 -1
- package/build/queries/sql/Tables.d.mts +46 -39
- package/build/queries/sql/Tables.d.mts.map +1 -1
- package/build/queries/sql/Tables.js +10 -1
- package/build/queries/sql/Tables.js.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 +68 -89
- package/build/queries/sql/execute.cjs.map +1 -1
- package/build/queries/sql/execute.d.cts +49 -32
- package/build/queries/sql/execute.d.cts.map +1 -1
- package/build/queries/sql/execute.d.mts +49 -32
- package/build/queries/sql/execute.d.mts.map +1 -1
- package/build/queries/sql/execute.js +70 -91
- 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 +77 -30
- package/build/queries/sql/query.cjs.map +1 -1
- package/build/queries/sql/query.d.cts +119 -76
- package/build/queries/sql/query.d.cts.map +1 -1
- package/build/queries/sql/query.d.mts +119 -76
- package/build/queries/sql/query.d.mts.map +1 -1
- package/build/queries/sql/query.js +75 -30
- package/build/queries/sql/query.js.map +1 -1
- package/build/queries/unnest.cjs +4 -5
- package/build/queries/unnest.cjs.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/unnest.js +4 -5
- package/build/queries/unnest.js.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 +171 -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 +172 -3
- package/build/reactivity/ReactionsManager.js.map +1 -1
- package/build/reactivity/reactiveHints.cjs +9 -3
- package/build/reactivity/reactiveHints.cjs.map +1 -1
- package/build/reactivity/reactiveHints.d.cts +19 -18
- package/build/reactivity/reactiveHints.d.cts.map +1 -1
- package/build/reactivity/reactiveHints.d.mts +19 -18
- package/build/reactivity/reactiveHints.d.mts.map +1 -1
- package/build/reactivity/reactiveHints.js +9 -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 +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 +1 -1
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs +23 -5
- package/build/relations/AsyncReactiveField.cjs.map +1 -1
- package/build/relations/AsyncReactiveField.d.cts +7 -6
- package/build/relations/AsyncReactiveField.d.cts.map +1 -1
- package/build/relations/AsyncReactiveField.d.mts +7 -6
- package/build/relations/AsyncReactiveField.d.mts.map +1 -1
- package/build/relations/AsyncReactiveField.js +23 -5
- 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 +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 +1 -1
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs +2 -2
- 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 +2 -2
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs +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 +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 +16 -2
- 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 +16 -2
- package/build/relations/LazyField.js.map +1 -1
- package/build/relations/ManyToManyCollection.cjs +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 +1 -1
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.cjs +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/ManyToManyLargeCollection.js +1 -1
- package/build/relations/ManyToOneReference.cjs +2 -2
- 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 +2 -2
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs +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 +1 -1
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs +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 +1 -1
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs +2 -2
- 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 +2 -2
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs +2 -2
- 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 +2 -2
- 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 +27 -6
- package/build/relations/ReactiveField.cjs.map +1 -1
- package/build/relations/ReactiveField.d.cts +11 -7
- package/build/relations/ReactiveField.d.cts.map +1 -1
- package/build/relations/ReactiveField.d.mts +11 -7
- package/build/relations/ReactiveField.d.mts.map +1 -1
- package/build/relations/ReactiveField.js +27 -6
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs +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 +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 +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 +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs +2 -2
- package/build/relations/ReactiveReference.cjs.map +1 -1
- package/build/relations/ReactiveReference.d.cts +6 -7
- package/build/relations/ReactiveReference.d.cts.map +1 -1
- package/build/relations/ReactiveReference.d.mts +6 -7
- package/build/relations/ReactiveReference.d.mts.map +1 -1
- package/build/relations/ReactiveReference.js +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +24 -5
- package/build/relations/hasAsyncMethod.cjs.map +1 -1
- package/build/relations/hasAsyncMethod.d.cts +9 -8
- package/build/relations/hasAsyncMethod.d.cts.map +1 -1
- package/build/relations/hasAsyncMethod.d.mts +9 -8
- package/build/relations/hasAsyncMethod.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.js +24 -6
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.cjs +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/hasManyDerived.js +1 -1
- package/build/relations/hasManyThrough.cjs +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/hasManyThrough.js +1 -1
- package/build/relations/hasOneDerived.cjs +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/hasOneDerived.js +1 -1
- package/build/relations/hasOneThrough.cjs +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/hasOneThrough.js +1 -1
- package/build/relations/hasProperty.cjs +1 -1
- 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 +1 -1
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/hasReactiveAsyncMethod.cjs +87 -0
- package/build/relations/hasReactiveAsyncMethod.cjs.map +1 -0
- package/build/relations/hasReactiveAsyncMethod.d.cts +32 -0
- package/build/relations/hasReactiveAsyncMethod.d.cts.map +1 -0
- package/build/relations/hasReactiveAsyncMethod.d.mts +32 -0
- package/build/relations/hasReactiveAsyncMethod.d.mts.map +1 -0
- package/build/relations/hasReactiveAsyncMethod.js +85 -0
- package/build/relations/hasReactiveAsyncMethod.js.map +1 -0
- package/build/relations/index.cjs +2 -0
- package/build/relations/index.d.cts +2 -1
- package/build/relations/index.d.mts +2 -1
- package/build/relations/index.js +2 -1
- 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.cjs +1 -1
- package/build/rules.cjs.map +1 -1
- package/build/rules.d.cts +25 -20
- package/build/rules.d.cts.map +1 -1
- package/build/rules.d.mts +25 -20
- package/build/rules.d.mts.map +1 -1
- package/build/rules.js +1 -1
- package/build/rules.js.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.cjs +3 -0
- package/build/serde/columns.cjs.map +1 -1
- package/build/serde/columns.d.cts +3 -3
- package/build/serde/columns.d.cts.map +1 -1
- package/build/serde/columns.d.mts +3 -3
- package/build/serde/columns.d.mts.map +1 -1
- package/build/serde/columns.js +3 -0
- package/build/serde/columns.js.map +1 -1
- package/build/serde/fieldSerde.cjs +3 -0
- package/build/serde/fieldSerde.cjs.map +1 -1
- package/build/serde/fieldSerde.d.cts +10 -9
- package/build/serde/fieldSerde.d.cts.map +1 -1
- package/build/serde/fieldSerde.d.mts +10 -9
- package/build/serde/fieldSerde.d.mts.map +1 -1
- package/build/serde/fieldSerde.js +3 -0
- package/build/serde/fieldSerde.js.map +1 -1
- package/build/serde/serde.cjs +60 -0
- package/build/serde/serde.cjs.map +1 -1
- package/build/serde/serde.d.cts +58 -19
- package/build/serde/serde.d.cts.map +1 -1
- package/build/serde/serde.d.mts +58 -19
- package/build/serde/serde.d.mts.map +1 -1
- package/build/serde/serde.js +60 -1
- package/build/serde/serde.js.map +1 -1
- package/build/serde/temporal.cjs +7 -12
- package/build/serde/temporal.cjs.map +1 -1
- package/build/serde/temporal.d.cts +6 -6
- package/build/serde/temporal.d.cts.map +1 -1
- package/build/serde/temporal.d.mts +6 -6
- package/build/serde/temporal.d.mts.map +1 -1
- package/build/serde/temporal.js +7 -12
- package/build/serde/temporal.js.map +1 -1
- package/build/serde/temporalMappers.cjs +8 -4
- package/build/serde/temporalMappers.cjs.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/serde/temporalMappers.js +8 -4
- package/build/serde/temporalMappers.js.map +1 -1
- package/build/transitions.cjs +91 -0
- package/build/transitions.cjs.map +1 -0
- package/build/transitions.d.cts +115 -0
- package/build/transitions.d.cts.map +1 -0
- package/build/transitions.d.mts +115 -0
- package/build/transitions.d.mts.map +1 -0
- package/build/transitions.js +86 -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.cjs +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/upsert.js +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
|
@@ -2,30 +2,30 @@ import { ColumnsOf, TypeMapEntry } from "../../typeMap.cjs";
|
|
|
2
2
|
import { SqlCondition } from "../conditions.cjs";
|
|
3
3
|
import { CustomColumnInputs, CustomColumnValue, CustomColumnsOf, CustomTableFor } from "./custom.cjs";
|
|
4
4
|
import { TableFor, tableMgmt } from "./Tables.cjs";
|
|
5
|
-
import { CheckReadQuery, CheckScope, CheckSetQuery, EntityHydrator, NameOf, Plan, Query, QueryJoinInput, QueryRow, ReadQueryRow, SetOperand, SetOperation, SetQuery,
|
|
5
|
+
import { CheckReadQuery, CheckScope, CheckSetQuery, EntityHydrator, NameOf, Plan, Query, QueryJoinInput, QueryRow, QueryTable, ReadQueryRow, SetOperand, SetOperation, SetQuery, WithInput, entityQueryBrand, subqueryBrand } from "./query.cjs";
|
|
6
6
|
import { ExprBrand, ExprLike, exprBrand } from "./Expr.cjs";
|
|
7
7
|
import { DriverQueryResult } from "../../drivers/Driver.cjs";
|
|
8
8
|
import { IdOf } from "../../EntityManager.cjs";
|
|
9
9
|
import { Entity } from "../../Entity.cjs";
|
|
10
10
|
//#region src/queries/sql/execute.d.ts
|
|
11
11
|
/** The native command count and decoded rows from one immediate SQL statement. */
|
|
12
|
-
interface ExecuteResult<R> {
|
|
12
|
+
export interface ExecuteResult<R> {
|
|
13
13
|
rowCount: number;
|
|
14
14
|
rows: R[];
|
|
15
15
|
}
|
|
16
16
|
/** A mutation's RETURNING projection: one SQL expression or a named object of expressions. */
|
|
17
|
-
type MutationReturning = (ExprLike<unknown> | Readonly<Record<string, ExprLike<unknown>>>) & {
|
|
17
|
+
export type MutationReturning = (ExprLike<unknown> | Readonly<Record<string, ExprLike<unknown>>>) & {
|
|
18
18
|
readonly [tableMgmt]?: never;
|
|
19
19
|
readonly [subqueryBrand]?: never;
|
|
20
20
|
readonly [entityQueryBrand]?: never;
|
|
21
21
|
};
|
|
22
22
|
/** SQL INSERT inputs, based on physical storage rather than entity creation options. */
|
|
23
|
-
type InsertValues<T extends Entity> = { [K in RequiredInsertKey<T>]: Assignment<T, K>; } & { [K in Exclude<InsertKey<T>, RequiredInsertKey<T>>]?: Assignment<T, K> | undefined; };
|
|
23
|
+
export type InsertValues<T extends Entity> = { [K in RequiredInsertKey<T>]: Assignment<T, K>; } & { [K in Exclude<InsertKey<T>, RequiredInsertKey<T>>]?: Assignment<T, K> | undefined; };
|
|
24
24
|
/** SQL UPDATE inputs include persisted derived columns, but never primary keys. */
|
|
25
|
-
type UpdateValues<T extends Entity> = { [K in UpdateKey<T>]?: Assignment<T, K> | undefined; };
|
|
25
|
+
export type UpdateValues<T extends Entity> = { [K in UpdateKey<T>]?: Assignment<T, K> | undefined; };
|
|
26
26
|
/** A reusable INSERT POJO; use a concrete Q for annotated INSERT SELECT source checking. */
|
|
27
|
-
type InsertStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined, Q extends SetOperand = Query<InsertProjection<T>, []> |
|
|
28
|
-
readonly insert:
|
|
27
|
+
export type InsertStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined, Q extends SetOperand = Query<InsertProjection<T>, []> | QueryTable<InsertSourceRow<T>, string>> = {
|
|
28
|
+
readonly insert: MutationTargetTable<T>;
|
|
29
29
|
readonly returning?: R;
|
|
30
30
|
readonly update?: never;
|
|
31
31
|
readonly delete?: never;
|
|
@@ -43,8 +43,8 @@ type InsertStatement<T extends Entity, R extends MutationReturning | undefined =
|
|
|
43
43
|
readonly values?: never;
|
|
44
44
|
});
|
|
45
45
|
/** A reusable guarded UPDATE POJO. Undefined assignments leave existing columns unchanged. */
|
|
46
|
-
type UpdateStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
47
|
-
readonly update:
|
|
46
|
+
export type UpdateStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
47
|
+
readonly update: MutationTargetTable<T>;
|
|
48
48
|
readonly set: UpdateValues<T>;
|
|
49
49
|
readonly returning?: R;
|
|
50
50
|
readonly insert?: never;
|
|
@@ -55,8 +55,8 @@ type UpdateStatement<T extends Entity, R extends MutationReturning | undefined =
|
|
|
55
55
|
readonly with?: WithInput;
|
|
56
56
|
} & MutationFilter & NoMutationReadClauses;
|
|
57
57
|
/** A reusable guarded physical DELETE POJO, not an ORM soft delete. */
|
|
58
|
-
type DeleteStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
59
|
-
readonly delete:
|
|
58
|
+
export type DeleteStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
59
|
+
readonly delete: MutationTargetTable<T>;
|
|
60
60
|
readonly returning?: R;
|
|
61
61
|
readonly insert?: never;
|
|
62
62
|
readonly update?: never;
|
|
@@ -67,9 +67,9 @@ type DeleteStatement<T extends Entity, R extends MutationReturning | undefined =
|
|
|
67
67
|
readonly with?: WithInput;
|
|
68
68
|
} & MutationFilter & NoMutationReadClauses;
|
|
69
69
|
/** Public statement annotations retain the target's physical field policy. */
|
|
70
|
-
type MutationStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = InsertStatement<T, R> | UpdateStatement<T, R> | DeleteStatement<T, R>;
|
|
70
|
+
export type MutationStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = InsertStatement<T, R> | UpdateStatement<T, R> | DeleteStatement<T, R>;
|
|
71
71
|
/** Inference starts with the literal POJO; CheckMutation checks its target and every supplied key. */
|
|
72
|
-
type MutationInput = ({
|
|
72
|
+
export type MutationInput = ({
|
|
73
73
|
readonly insert: TableFor<Entity>;
|
|
74
74
|
readonly values: readonly object[];
|
|
75
75
|
readonly from?: never;
|
|
@@ -100,18 +100,18 @@ type MutationInput = ({
|
|
|
100
100
|
readonly with?: WithInput;
|
|
101
101
|
} & MutationFilter;
|
|
102
102
|
/** Without RETURNING the row type is never; scalar expressions produce scalar rows. */
|
|
103
|
-
type MutationRow<M> = M extends {
|
|
103
|
+
export type MutationRow<M> = M extends {
|
|
104
104
|
readonly returning?: infer R;
|
|
105
105
|
} ? R extends MutationReturning ? R extends ExprLike<unknown> ? QueryRow<R> : { -readonly [K in keyof QueryRow<R>]: QueryRow<R>[K]; } : never : never;
|
|
106
106
|
/** Checks nonliteral statements as well as fresh literals without widening their inferred result. */
|
|
107
|
-
type CheckMutation<M> = M extends unknown ? [CustomColumnsOf<TargetTable<M>>] extends [never] ? TargetEntity<M> extends (infer T extends Entity) ? TypeMapEntry<T, "supportsEmExecute"> extends true ? { readonly [K in keyof M]: K extends MutationClause<M> ? unknown : never; } & {
|
|
107
|
+
export type CheckMutation<M> = M extends unknown ? [CustomColumnsOf<TargetTable<M>>] extends [never] ? TargetEntity<M> extends (infer T extends Entity) ? TypeMapEntry<T, "supportsEmExecute"> extends true ? { readonly [K in keyof M]: K extends MutationClause<M> ? unknown : never; } & {
|
|
108
108
|
readonly returning?: M extends {
|
|
109
109
|
readonly returning?: infer R;
|
|
110
110
|
} ? CheckReturning<R, NameOf<TargetTable<M>>> : never;
|
|
111
111
|
} & ((M extends {
|
|
112
112
|
readonly values: infer V extends readonly unknown[];
|
|
113
113
|
} ? {
|
|
114
|
-
readonly values: CheckValues<T
|
|
114
|
+
readonly values: CheckValues<InsertValues<T>, V>;
|
|
115
115
|
} : never) | (M extends {
|
|
116
116
|
readonly from: infer Q extends SetOperand;
|
|
117
117
|
} ? {
|
|
@@ -124,17 +124,17 @@ type CheckMutation<M> = M extends unknown ? [CustomColumnsOf<TargetTable<M>>] ex
|
|
|
124
124
|
readonly delete: unknown;
|
|
125
125
|
} ? unknown : never)) : "SQL mutations require a supported non-inherited target and regenerated metadata" : never : CheckCustomMutation<M> : never;
|
|
126
126
|
/** Classifies mutation roots before EntityManager applies write permissions, including malformed roots. */
|
|
127
|
-
declare function isMutation(arg: unknown): boolean;
|
|
127
|
+
export declare function isMutation(arg: unknown): boolean;
|
|
128
128
|
/**
|
|
129
129
|
* Compiles one immediate statement using the read compiler's scopes, projections, and codecs.
|
|
130
130
|
* INSERT SELECT keeps source rows in PostgreSQL; only RETURNING rows pass through JS decoders.
|
|
131
131
|
* An undefined plan represents a validated standalone empty VALUES array, not DEFAULT VALUES.
|
|
132
132
|
*/
|
|
133
|
-
declare function parseStatement(arg: unknown): Plan | undefined;
|
|
133
|
+
export declare function parseStatement(arg: unknown): Plan | undefined;
|
|
134
134
|
/** Retains native counts even when no rows return, and propagates decoding failures after execution. */
|
|
135
|
-
declare function decodeStatementResult(em: EntityHydrator, plan: Plan, result: DriverQueryResult): ExecuteResult<unknown>;
|
|
135
|
+
export declare function decodeStatementResult(em: EntityHydrator, plan: Plan, result: DriverQueryResult): ExecuteResult<unknown>;
|
|
136
136
|
/** An entity table whose generated metadata permits direct SQL mutations. */
|
|
137
|
-
type
|
|
137
|
+
type MutationTargetTable<T extends Entity> = TableFor<T> & (TypeMapEntry<T, "supportsEmExecute"> extends true ? unknown : never);
|
|
138
138
|
/** Shared filtering and full-table consent clauses for UPDATE and DELETE. */
|
|
139
139
|
type MutationFilter = {
|
|
140
140
|
/**
|
|
@@ -147,8 +147,14 @@ type MutationFilter = {
|
|
|
147
147
|
readonly allowAll?: boolean;
|
|
148
148
|
readonly softDeletes?: "include" | "exclude";
|
|
149
149
|
};
|
|
150
|
-
/**
|
|
151
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Read-only query clauses that mutations explicitly reject, plus the clause names users guess.
|
|
152
|
+
*
|
|
153
|
+
* `using` and `onConflict` are here rather than on `Query` on purpose: they are mutation-only SQL
|
|
154
|
+
* clauses Joist does not support, so they are a plausible guess when writing a mutation and meaningless
|
|
155
|
+
* on a read. `ctes` is banned on both sides, since it is the common guess for `with`.
|
|
156
|
+
*/
|
|
157
|
+
type NoMutationReadClauses = Partial<Record<"select" | "join" | "groupBy" | "having" | "orderBy" | "limit" | "offset" | "distinct" | "pruneJoins" | "as" | "union" | "unionAll" | "intersect" | "intersectAll" | "except" | "exceptAll" | "using" | "onConflict", never>>;
|
|
152
158
|
/** Column keys allowed in INSERT, i.e. Book's optional `id` and required `authorId`. */
|
|
153
159
|
type InsertKey<T> = { [K in keyof ColumnsOf<T>]: ColumnsOf<T>[K] extends {
|
|
154
160
|
insert: "required" | "optional";
|
|
@@ -225,8 +231,14 @@ type EmptyReturning<R> = R extends object ? (keyof R extends never ? true : fals
|
|
|
225
231
|
type CheckReturning<R, Scope> = true extends EmptyReturning<R> ? never : CheckExprScope<ReturningExpr<R>, Scope>;
|
|
226
232
|
/** Validates assignment keys, values, and expression sources without distributing union inputs. */
|
|
227
233
|
type CheckAssignments<V, Allowed, Scope> = [Exclude<UnionKeys<V>, keyof Allowed>] extends [never] ? Allowed & { [K in UnionKeys<V>]?: CheckExprScope<UnionValue<V, K>, Scope>; } : "SQL assignments have unknown target fields";
|
|
228
|
-
/**
|
|
229
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Checks every INSERT row in a readonly collection against the target's writable columns.
|
|
236
|
+
*
|
|
237
|
+
* `Allowed` is the target's accepted assignments, i.e. `InsertValues<T>` for an entity table and
|
|
238
|
+
* `CustomInsertValues<C>` for a declared one. The scope is `never` because a VALUES cell cannot read
|
|
239
|
+
* the row being written.
|
|
240
|
+
*/
|
|
241
|
+
type CheckValues<Allowed, V extends readonly unknown[]> = readonly CheckAssignments<V[number], Allowed, never>[];
|
|
230
242
|
/**
|
|
231
243
|
* Checks a custom-table mutation against its declared primitive columns.
|
|
232
244
|
*
|
|
@@ -242,7 +254,7 @@ type CheckCustomMutation<M> = { readonly [K in keyof M]: K extends MutationClaus
|
|
|
242
254
|
} & ((M extends {
|
|
243
255
|
readonly values: infer V extends readonly unknown[];
|
|
244
256
|
} ? {
|
|
245
|
-
readonly values:
|
|
257
|
+
readonly values: CheckValues<CustomInsertValues<CustomColumnsOf<TargetTable<M>>>, V>;
|
|
246
258
|
} : never) | (M extends {
|
|
247
259
|
readonly from: infer Q extends SetOperand;
|
|
248
260
|
} ? {
|
|
@@ -254,17 +266,22 @@ type CheckCustomMutation<M> = { readonly [K in keyof M]: K extends MutationClaus
|
|
|
254
266
|
} : never) | (M extends {
|
|
255
267
|
readonly delete: unknown;
|
|
256
268
|
} ? unknown : never));
|
|
257
|
-
/**
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Checks an INSERT SELECT's named outputs, required columns, values, and read source.
|
|
271
|
+
*
|
|
272
|
+
* `Row` is the row shape the source must produce and `Keys` the target's writable column keys, i.e.
|
|
273
|
+
* `InsertSourceRow<T>` and `InsertKey<T>` for an entity table.
|
|
274
|
+
*/
|
|
275
|
+
type CheckInsertSourceOf<Row, Keys extends PropertyKey, Q> = SetOperand extends Q ? "INSERT source type lost its select keys; use `satisfies Query` or `satisfies SetQuery` instead of a type annotation" : ReadQueryRow<Q> extends Row ? Exclude<UnionKeys<ReadQueryRow<Q>>, Keys> extends never ? CheckReadQuery<Q> & CheckSourceScope<Q> & (Q extends SetQuery<readonly SetOperand[]> ? CheckSetQuery<Q> : unknown) : "INSERT SELECT has unknown target fields" : "INSERT SELECT requires compatible values for all SQL-required fields";
|
|
276
|
+
/** Checks a custom INSERT SELECT against the table's declared writable columns. */
|
|
277
|
+
type CheckCustomInsertSource<C extends CustomColumnInputs, Q> = CheckInsertSourceOf<CustomInsertSourceRow<C>, CustomInsertKey<C>, Q>;
|
|
261
278
|
/** Checks every SELECT expression against the tables visible within its read-query branch. */
|
|
262
279
|
type CheckSourceScope<Q> = Q extends {
|
|
263
280
|
readonly select: infer S;
|
|
264
281
|
readonly from: infer F;
|
|
265
282
|
} ? CheckScope<S, F, "join" extends keyof Q ? Extract<Q[keyof Q & "join"], QueryJoinInput> : []> : { [K in keyof Q]: K extends SetOperation ? Q[K] extends readonly unknown[] ? { [I in keyof Q[K]]: CheckSourceScope<Q[K][I]>; } : unknown : unknown; };
|
|
266
|
-
/** Checks an entity INSERT SELECT's
|
|
267
|
-
type CheckInsertSource<T, Q extends SetOperand> =
|
|
283
|
+
/** Checks an entity INSERT SELECT against the entity's writable columns. */
|
|
284
|
+
type CheckInsertSource<T, Q extends SetOperand> = CheckInsertSourceOf<InsertSourceRow<T>, InsertKey<T>, Q>;
|
|
268
285
|
/** Extracts the entity type from any mutation target clause. */
|
|
269
286
|
type TargetEntity<M> = M extends {
|
|
270
287
|
readonly insert: TableFor<infer T>;
|
|
@@ -290,5 +307,5 @@ type MutationClause<M> = "returning" | "with" | (M extends {
|
|
|
290
307
|
readonly update: unknown;
|
|
291
308
|
} ? "update" | "set" : "delete"));
|
|
292
309
|
//#endregion
|
|
293
|
-
export {
|
|
310
|
+
export {};
|
|
294
311
|
//# sourceMappingURL=execute.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.cts","names":[],"sources":["../../../src/queries/sql/execute.ts"],"mappings":";;;;;;;;;;;
|
|
1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qB;iEACO;WAAqB"}
|
|
@@ -2,30 +2,30 @@ import { ColumnsOf, TypeMapEntry } from "../../typeMap.mjs";
|
|
|
2
2
|
import { SqlCondition } from "../conditions.mjs";
|
|
3
3
|
import { CustomColumnInputs, CustomColumnValue, CustomColumnsOf, CustomTableFor } from "./custom.mjs";
|
|
4
4
|
import { TableFor, tableMgmt } from "./Tables.mjs";
|
|
5
|
-
import { CheckReadQuery, CheckScope, CheckSetQuery, EntityHydrator, NameOf, Plan, Query, QueryJoinInput, QueryRow, ReadQueryRow, SetOperand, SetOperation, SetQuery,
|
|
5
|
+
import { CheckReadQuery, CheckScope, CheckSetQuery, EntityHydrator, NameOf, Plan, Query, QueryJoinInput, QueryRow, QueryTable, ReadQueryRow, SetOperand, SetOperation, SetQuery, WithInput, entityQueryBrand, subqueryBrand } from "./query.mjs";
|
|
6
6
|
import { ExprBrand, ExprLike, exprBrand } from "./Expr.mjs";
|
|
7
7
|
import { DriverQueryResult } from "../../drivers/Driver.mjs";
|
|
8
8
|
import { IdOf } from "../../EntityManager.mjs";
|
|
9
9
|
import { Entity } from "../../Entity.mjs";
|
|
10
10
|
//#region src/queries/sql/execute.d.ts
|
|
11
11
|
/** The native command count and decoded rows from one immediate SQL statement. */
|
|
12
|
-
interface ExecuteResult<R> {
|
|
12
|
+
export interface ExecuteResult<R> {
|
|
13
13
|
rowCount: number;
|
|
14
14
|
rows: R[];
|
|
15
15
|
}
|
|
16
16
|
/** A mutation's RETURNING projection: one SQL expression or a named object of expressions. */
|
|
17
|
-
type MutationReturning = (ExprLike<unknown> | Readonly<Record<string, ExprLike<unknown>>>) & {
|
|
17
|
+
export type MutationReturning = (ExprLike<unknown> | Readonly<Record<string, ExprLike<unknown>>>) & {
|
|
18
18
|
readonly [tableMgmt]?: never;
|
|
19
19
|
readonly [subqueryBrand]?: never;
|
|
20
20
|
readonly [entityQueryBrand]?: never;
|
|
21
21
|
};
|
|
22
22
|
/** SQL INSERT inputs, based on physical storage rather than entity creation options. */
|
|
23
|
-
type InsertValues<T extends Entity> = { [K in RequiredInsertKey<T>]: Assignment<T, K>; } & { [K in Exclude<InsertKey<T>, RequiredInsertKey<T>>]?: Assignment<T, K> | undefined; };
|
|
23
|
+
export type InsertValues<T extends Entity> = { [K in RequiredInsertKey<T>]: Assignment<T, K>; } & { [K in Exclude<InsertKey<T>, RequiredInsertKey<T>>]?: Assignment<T, K> | undefined; };
|
|
24
24
|
/** SQL UPDATE inputs include persisted derived columns, but never primary keys. */
|
|
25
|
-
type UpdateValues<T extends Entity> = { [K in UpdateKey<T>]?: Assignment<T, K> | undefined; };
|
|
25
|
+
export type UpdateValues<T extends Entity> = { [K in UpdateKey<T>]?: Assignment<T, K> | undefined; };
|
|
26
26
|
/** A reusable INSERT POJO; use a concrete Q for annotated INSERT SELECT source checking. */
|
|
27
|
-
type InsertStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined, Q extends SetOperand = Query<InsertProjection<T>, []> |
|
|
28
|
-
readonly insert:
|
|
27
|
+
export type InsertStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined, Q extends SetOperand = Query<InsertProjection<T>, []> | QueryTable<InsertSourceRow<T>, string>> = {
|
|
28
|
+
readonly insert: MutationTargetTable<T>;
|
|
29
29
|
readonly returning?: R;
|
|
30
30
|
readonly update?: never;
|
|
31
31
|
readonly delete?: never;
|
|
@@ -43,8 +43,8 @@ type InsertStatement<T extends Entity, R extends MutationReturning | undefined =
|
|
|
43
43
|
readonly values?: never;
|
|
44
44
|
});
|
|
45
45
|
/** A reusable guarded UPDATE POJO. Undefined assignments leave existing columns unchanged. */
|
|
46
|
-
type UpdateStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
47
|
-
readonly update:
|
|
46
|
+
export type UpdateStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
47
|
+
readonly update: MutationTargetTable<T>;
|
|
48
48
|
readonly set: UpdateValues<T>;
|
|
49
49
|
readonly returning?: R;
|
|
50
50
|
readonly insert?: never;
|
|
@@ -55,8 +55,8 @@ type UpdateStatement<T extends Entity, R extends MutationReturning | undefined =
|
|
|
55
55
|
readonly with?: WithInput;
|
|
56
56
|
} & MutationFilter & NoMutationReadClauses;
|
|
57
57
|
/** A reusable guarded physical DELETE POJO, not an ORM soft delete. */
|
|
58
|
-
type DeleteStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
59
|
-
readonly delete:
|
|
58
|
+
export type DeleteStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = {
|
|
59
|
+
readonly delete: MutationTargetTable<T>;
|
|
60
60
|
readonly returning?: R;
|
|
61
61
|
readonly insert?: never;
|
|
62
62
|
readonly update?: never;
|
|
@@ -67,9 +67,9 @@ type DeleteStatement<T extends Entity, R extends MutationReturning | undefined =
|
|
|
67
67
|
readonly with?: WithInput;
|
|
68
68
|
} & MutationFilter & NoMutationReadClauses;
|
|
69
69
|
/** Public statement annotations retain the target's physical field policy. */
|
|
70
|
-
type MutationStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = InsertStatement<T, R> | UpdateStatement<T, R> | DeleteStatement<T, R>;
|
|
70
|
+
export type MutationStatement<T extends Entity, R extends MutationReturning | undefined = MutationReturning | undefined> = InsertStatement<T, R> | UpdateStatement<T, R> | DeleteStatement<T, R>;
|
|
71
71
|
/** Inference starts with the literal POJO; CheckMutation checks its target and every supplied key. */
|
|
72
|
-
type MutationInput = ({
|
|
72
|
+
export type MutationInput = ({
|
|
73
73
|
readonly insert: TableFor<Entity>;
|
|
74
74
|
readonly values: readonly object[];
|
|
75
75
|
readonly from?: never;
|
|
@@ -100,18 +100,18 @@ type MutationInput = ({
|
|
|
100
100
|
readonly with?: WithInput;
|
|
101
101
|
} & MutationFilter;
|
|
102
102
|
/** Without RETURNING the row type is never; scalar expressions produce scalar rows. */
|
|
103
|
-
type MutationRow<M> = M extends {
|
|
103
|
+
export type MutationRow<M> = M extends {
|
|
104
104
|
readonly returning?: infer R;
|
|
105
105
|
} ? R extends MutationReturning ? R extends ExprLike<unknown> ? QueryRow<R> : { -readonly [K in keyof QueryRow<R>]: QueryRow<R>[K]; } : never : never;
|
|
106
106
|
/** Checks nonliteral statements as well as fresh literals without widening their inferred result. */
|
|
107
|
-
type CheckMutation<M> = M extends unknown ? [CustomColumnsOf<TargetTable<M>>] extends [never] ? TargetEntity<M> extends (infer T extends Entity) ? TypeMapEntry<T, "supportsEmExecute"> extends true ? { readonly [K in keyof M]: K extends MutationClause<M> ? unknown : never; } & {
|
|
107
|
+
export type CheckMutation<M> = M extends unknown ? [CustomColumnsOf<TargetTable<M>>] extends [never] ? TargetEntity<M> extends (infer T extends Entity) ? TypeMapEntry<T, "supportsEmExecute"> extends true ? { readonly [K in keyof M]: K extends MutationClause<M> ? unknown : never; } & {
|
|
108
108
|
readonly returning?: M extends {
|
|
109
109
|
readonly returning?: infer R;
|
|
110
110
|
} ? CheckReturning<R, NameOf<TargetTable<M>>> : never;
|
|
111
111
|
} & ((M extends {
|
|
112
112
|
readonly values: infer V extends readonly unknown[];
|
|
113
113
|
} ? {
|
|
114
|
-
readonly values: CheckValues<T
|
|
114
|
+
readonly values: CheckValues<InsertValues<T>, V>;
|
|
115
115
|
} : never) | (M extends {
|
|
116
116
|
readonly from: infer Q extends SetOperand;
|
|
117
117
|
} ? {
|
|
@@ -124,17 +124,17 @@ type CheckMutation<M> = M extends unknown ? [CustomColumnsOf<TargetTable<M>>] ex
|
|
|
124
124
|
readonly delete: unknown;
|
|
125
125
|
} ? unknown : never)) : "SQL mutations require a supported non-inherited target and regenerated metadata" : never : CheckCustomMutation<M> : never;
|
|
126
126
|
/** Classifies mutation roots before EntityManager applies write permissions, including malformed roots. */
|
|
127
|
-
declare function isMutation(arg: unknown): boolean;
|
|
127
|
+
export declare function isMutation(arg: unknown): boolean;
|
|
128
128
|
/**
|
|
129
129
|
* Compiles one immediate statement using the read compiler's scopes, projections, and codecs.
|
|
130
130
|
* INSERT SELECT keeps source rows in PostgreSQL; only RETURNING rows pass through JS decoders.
|
|
131
131
|
* An undefined plan represents a validated standalone empty VALUES array, not DEFAULT VALUES.
|
|
132
132
|
*/
|
|
133
|
-
declare function parseStatement(arg: unknown): Plan | undefined;
|
|
133
|
+
export declare function parseStatement(arg: unknown): Plan | undefined;
|
|
134
134
|
/** Retains native counts even when no rows return, and propagates decoding failures after execution. */
|
|
135
|
-
declare function decodeStatementResult(em: EntityHydrator, plan: Plan, result: DriverQueryResult): ExecuteResult<unknown>;
|
|
135
|
+
export declare function decodeStatementResult(em: EntityHydrator, plan: Plan, result: DriverQueryResult): ExecuteResult<unknown>;
|
|
136
136
|
/** An entity table whose generated metadata permits direct SQL mutations. */
|
|
137
|
-
type
|
|
137
|
+
type MutationTargetTable<T extends Entity> = TableFor<T> & (TypeMapEntry<T, "supportsEmExecute"> extends true ? unknown : never);
|
|
138
138
|
/** Shared filtering and full-table consent clauses for UPDATE and DELETE. */
|
|
139
139
|
type MutationFilter = {
|
|
140
140
|
/**
|
|
@@ -147,8 +147,14 @@ type MutationFilter = {
|
|
|
147
147
|
readonly allowAll?: boolean;
|
|
148
148
|
readonly softDeletes?: "include" | "exclude";
|
|
149
149
|
};
|
|
150
|
-
/**
|
|
151
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Read-only query clauses that mutations explicitly reject, plus the clause names users guess.
|
|
152
|
+
*
|
|
153
|
+
* `using` and `onConflict` are here rather than on `Query` on purpose: they are mutation-only SQL
|
|
154
|
+
* clauses Joist does not support, so they are a plausible guess when writing a mutation and meaningless
|
|
155
|
+
* on a read. `ctes` is banned on both sides, since it is the common guess for `with`.
|
|
156
|
+
*/
|
|
157
|
+
type NoMutationReadClauses = Partial<Record<"select" | "join" | "groupBy" | "having" | "orderBy" | "limit" | "offset" | "distinct" | "pruneJoins" | "as" | "union" | "unionAll" | "intersect" | "intersectAll" | "except" | "exceptAll" | "using" | "onConflict", never>>;
|
|
152
158
|
/** Column keys allowed in INSERT, i.e. Book's optional `id` and required `authorId`. */
|
|
153
159
|
type InsertKey<T> = { [K in keyof ColumnsOf<T>]: ColumnsOf<T>[K] extends {
|
|
154
160
|
insert: "required" | "optional";
|
|
@@ -225,8 +231,14 @@ type EmptyReturning<R> = R extends object ? (keyof R extends never ? true : fals
|
|
|
225
231
|
type CheckReturning<R, Scope> = true extends EmptyReturning<R> ? never : CheckExprScope<ReturningExpr<R>, Scope>;
|
|
226
232
|
/** Validates assignment keys, values, and expression sources without distributing union inputs. */
|
|
227
233
|
type CheckAssignments<V, Allowed, Scope> = [Exclude<UnionKeys<V>, keyof Allowed>] extends [never] ? Allowed & { [K in UnionKeys<V>]?: CheckExprScope<UnionValue<V, K>, Scope>; } : "SQL assignments have unknown target fields";
|
|
228
|
-
/**
|
|
229
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Checks every INSERT row in a readonly collection against the target's writable columns.
|
|
236
|
+
*
|
|
237
|
+
* `Allowed` is the target's accepted assignments, i.e. `InsertValues<T>` for an entity table and
|
|
238
|
+
* `CustomInsertValues<C>` for a declared one. The scope is `never` because a VALUES cell cannot read
|
|
239
|
+
* the row being written.
|
|
240
|
+
*/
|
|
241
|
+
type CheckValues<Allowed, V extends readonly unknown[]> = readonly CheckAssignments<V[number], Allowed, never>[];
|
|
230
242
|
/**
|
|
231
243
|
* Checks a custom-table mutation against its declared primitive columns.
|
|
232
244
|
*
|
|
@@ -242,7 +254,7 @@ type CheckCustomMutation<M> = { readonly [K in keyof M]: K extends MutationClaus
|
|
|
242
254
|
} & ((M extends {
|
|
243
255
|
readonly values: infer V extends readonly unknown[];
|
|
244
256
|
} ? {
|
|
245
|
-
readonly values:
|
|
257
|
+
readonly values: CheckValues<CustomInsertValues<CustomColumnsOf<TargetTable<M>>>, V>;
|
|
246
258
|
} : never) | (M extends {
|
|
247
259
|
readonly from: infer Q extends SetOperand;
|
|
248
260
|
} ? {
|
|
@@ -254,17 +266,22 @@ type CheckCustomMutation<M> = { readonly [K in keyof M]: K extends MutationClaus
|
|
|
254
266
|
} : never) | (M extends {
|
|
255
267
|
readonly delete: unknown;
|
|
256
268
|
} ? unknown : never));
|
|
257
|
-
/**
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Checks an INSERT SELECT's named outputs, required columns, values, and read source.
|
|
271
|
+
*
|
|
272
|
+
* `Row` is the row shape the source must produce and `Keys` the target's writable column keys, i.e.
|
|
273
|
+
* `InsertSourceRow<T>` and `InsertKey<T>` for an entity table.
|
|
274
|
+
*/
|
|
275
|
+
type CheckInsertSourceOf<Row, Keys extends PropertyKey, Q> = SetOperand extends Q ? "INSERT source type lost its select keys; use `satisfies Query` or `satisfies SetQuery` instead of a type annotation" : ReadQueryRow<Q> extends Row ? Exclude<UnionKeys<ReadQueryRow<Q>>, Keys> extends never ? CheckReadQuery<Q> & CheckSourceScope<Q> & (Q extends SetQuery<readonly SetOperand[]> ? CheckSetQuery<Q> : unknown) : "INSERT SELECT has unknown target fields" : "INSERT SELECT requires compatible values for all SQL-required fields";
|
|
276
|
+
/** Checks a custom INSERT SELECT against the table's declared writable columns. */
|
|
277
|
+
type CheckCustomInsertSource<C extends CustomColumnInputs, Q> = CheckInsertSourceOf<CustomInsertSourceRow<C>, CustomInsertKey<C>, Q>;
|
|
261
278
|
/** Checks every SELECT expression against the tables visible within its read-query branch. */
|
|
262
279
|
type CheckSourceScope<Q> = Q extends {
|
|
263
280
|
readonly select: infer S;
|
|
264
281
|
readonly from: infer F;
|
|
265
282
|
} ? CheckScope<S, F, "join" extends keyof Q ? Extract<Q[keyof Q & "join"], QueryJoinInput> : []> : { [K in keyof Q]: K extends SetOperation ? Q[K] extends readonly unknown[] ? { [I in keyof Q[K]]: CheckSourceScope<Q[K][I]>; } : unknown : unknown; };
|
|
266
|
-
/** Checks an entity INSERT SELECT's
|
|
267
|
-
type CheckInsertSource<T, Q extends SetOperand> =
|
|
283
|
+
/** Checks an entity INSERT SELECT against the entity's writable columns. */
|
|
284
|
+
type CheckInsertSource<T, Q extends SetOperand> = CheckInsertSourceOf<InsertSourceRow<T>, InsertKey<T>, Q>;
|
|
268
285
|
/** Extracts the entity type from any mutation target clause. */
|
|
269
286
|
type TargetEntity<M> = M extends {
|
|
270
287
|
readonly insert: TableFor<infer T>;
|
|
@@ -290,5 +307,5 @@ type MutationClause<M> = "returning" | "with" | (M extends {
|
|
|
290
307
|
readonly update: unknown;
|
|
291
308
|
} ? "update" | "set" : "delete"));
|
|
292
309
|
//#endregion
|
|
293
|
-
export {
|
|
310
|
+
export {};
|
|
294
311
|
//# sourceMappingURL=execute.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.mts","names":[],"sources":["../../../src/queries/sql/execute.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"execute.d.mts","names":[],"sources":["../../../src/queries/sql/execute.ts"],"mappings":";;;;;;;;;;;iBA0DiB,cAAc;EAC7B;EACA,MAAM;;;YAII,qBAAqB,oBAAoB,SAAS,eAAe;YACjE;YACA;YACA;;;YAIA,aAAa,UAAU,aAChC,KAAK,kBAAkB,KAAK,WAAW,GAAG,WAE1C,KAAK,QAAQ,UAAU,IAAI,kBAAkB,OAAO,WAAW,GAAG;;YAIzD,aAAa,UAAU,aAChC,KAAK,UAAU,MAAM,WAAW,GAAG;;YAI1B,gBACV,UAAU,QACV,UAAU,gCAAgC,+BAC1C,UAAU,aAAa,MAAM,iBAAiB,UAAU,WAAW,gBAAgB;WAE1E,QAAQ,oBAAoB;WAC5B,YAAY;WACZ;WACA;WACA;WACA;WACA;WACA;;WAEA,OAAO;IACd;WAEa,iBAAiB,aAAa;WAAe;;WAC7C,MAAM,IAAI,kBAAkB,GAAG;WAAa;;;YAIjD,gBACV,UAAU,QACV,UAAU,gCAAgC;WAEjC,QAAQ,oBAAoB;WAC5B,KAAK,aAAa;WAClB,YAAY;WACZ;WACA;WACA;WACA;;WAEA,OAAO;IACd,iBACF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