joist-core 2.4.0 → 2.5.0-next.2
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.cjs +18 -7
- package/build/queries/find/QueryParser.cjs.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.cjs +2 -1
- package/build/queries/find/QueryParser.collectionJoins.cjs.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.collectionJoins.js +2 -1
- package/build/queries/find/QueryParser.collectionJoins.js.map +1 -1
- package/build/queries/find/QueryParser.d.cts +39 -18
- package/build/queries/find/QueryParser.d.cts.map +1 -1
- package/build/queries/find/QueryParser.d.mts +39 -18
- package/build/queries/find/QueryParser.d.mts.map +1 -1
- package/build/queries/find/QueryParser.js +18 -7
- package/build/queries/find/QueryParser.js.map +1 -1
- package/build/queries/find/QueryParser.pruning.cjs +50 -1
- package/build/queries/find/QueryParser.pruning.cjs.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.cts +15 -3
- package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.mts +15 -3
- package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
- package/build/queries/find/QueryParser.pruning.js +50 -1
- package/build/queries/find/QueryParser.pruning.js.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
|
@@ -16,21 +16,21 @@ interface ExprInputs {
|
|
|
16
16
|
greatest: GreatestInput;
|
|
17
17
|
least: LeastInput;
|
|
18
18
|
}
|
|
19
|
-
type ExprName = Exclude<keyof ExprInputs, "case" | "arrayAgg">;
|
|
19
|
+
export type ExprName = Exclude<keyof ExprInputs, "case" | "arrayAgg">;
|
|
20
20
|
type ExprArgsInput = { [K in ExprName]: { readonly [P in K]: readonly unknown[]; }; }[ExprName];
|
|
21
21
|
type ExprArgs<V> = Extract<V[keyof V & ExprName], readonly unknown[]>;
|
|
22
22
|
/** An expression object used in select or passed to expr, i.e. { coalesce: [a.last_name, a.first_name] }. */
|
|
23
|
-
type ExprInput = { [K in keyof ExprInputs]: ExprInputs[K] & { readonly [P in Exclude<keyof ExprInputs | "else", K>]?: never; }; }[keyof ExprInputs];
|
|
23
|
+
export type ExprInput = { [K in keyof ExprInputs]: ExprInputs[K] & { readonly [P in Exclude<keyof ExprInputs | "else", K>]?: never; }; }[keyof ExprInputs];
|
|
24
24
|
declare const inputBrand: unique symbol;
|
|
25
25
|
/** Retains the input object so query results can account for LEFT joins in each candidate separately. */
|
|
26
|
-
type ExprFromInput<I> = Expr<InputResult<I, []>, ExpressionSources<I>> & {
|
|
26
|
+
export type ExprFromInput<I> = Expr<InputResult<I, []>, ExpressionSources<I>> & {
|
|
27
27
|
readonly [inputBrand]: I;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* Computes the SQL expression type, including null from LEFT joins.
|
|
31
31
|
* I.e. Book.title is string | null when Book is LEFT-joined; COALESCE(Book.title, "Unknown") is string.
|
|
32
32
|
*/
|
|
33
|
-
type ExpressionValue<V, J extends QueryJoinList> = unknown extends V ? V : V extends {
|
|
33
|
+
export type ExpressionValue<V, J extends QueryJoinList> = unknown extends V ? V : V extends {
|
|
34
34
|
readonly [inputBrand]: infer I;
|
|
35
35
|
} ? InputResult<I, J> : V extends {
|
|
36
36
|
readonly [exprBrand]: ExprBrand<infer R, infer S>;
|
|
@@ -63,7 +63,7 @@ type BranchResult<V> = unknown extends V ? never : V extends ExprLike<infer R> ?
|
|
|
63
63
|
/** A fixed non-null candidate guarantees a result; a possibly empty candidate array does not. */
|
|
64
64
|
type CoalesceValue<A extends readonly unknown[], J extends QueryJoinList> = A extends readonly [infer H, ...infer T] ? Exclude<ExpressionValue<H, J>, null> | (null extends ExpressionValue<H, J> ? CoalesceValue<T, J> : never) : A extends readonly [...infer Before, infer Last] ? Exclude<ExpressionValue<A[number], J>, null> | (null extends ExpressionValue<Last, J> ? (null extends CoalesceValue<Before, J> ? null : never) : never) : ExpressionValue<A[number], J> | null;
|
|
65
65
|
/** Conditions affect which value is chosen, but do not make that value nullable through a LEFT join. */
|
|
66
|
-
type ExpressionSources<V> = unknown extends V ? string : V extends ExprLike<unknown> ? V[typeof exprBrand]["__source"] : V extends {
|
|
66
|
+
export type ExpressionSources<V> = unknown extends V ? string : V extends ExprLike<unknown> ? V[typeof exprBrand]["__source"] : V extends {
|
|
67
67
|
readonly arrayAgg: infer A;
|
|
68
68
|
} ? ExpressionSources<ArrayAggValue<A>> : V extends ExprArgsInput ? ExpressionSources<ExprArgs<V>[number]> : V extends {
|
|
69
69
|
readonly case: infer A;
|
|
@@ -75,7 +75,7 @@ type ExpressionSources<V> = unknown extends V ? string : V extends ExprLike<unkn
|
|
|
75
75
|
*/
|
|
76
76
|
type CompatibleValues<V, All = V> = false extends (V extends unknown ? All extends unknown ? CompatibleValue<ExpressionValue<V, []>, ExpressionValue<All, []>> : never : never) ? "Expression values must have compatible types" : unknown;
|
|
77
77
|
/** Checks nested expression shapes and literal fallbacks in one pass; R is the type supplied by existing expressions. */
|
|
78
|
-
type CheckExpression<V, R> = V extends ExprLike<unknown> ? unknown : V extends {
|
|
78
|
+
export type CheckExpression<V, R> = V extends ExprLike<unknown> ? unknown : V extends {
|
|
79
79
|
readonly arrayAgg: infer A;
|
|
80
80
|
} ? {
|
|
81
81
|
readonly arrayAgg: CheckArrayAgg<A, R extends readonly (infer E)[] ? E : never>;
|
|
@@ -87,20 +87,20 @@ type CheckExpression<V, R> = V extends ExprLike<unknown> ? unknown : V extends {
|
|
|
87
87
|
/** Checks fixed argument counts and then each operand; dynamic array lengths are checked at runtime. */
|
|
88
88
|
type CheckOperands<A extends readonly unknown[], Name extends ExprName, R> = (Name extends "nullIf" ? number extends A["length"] ? unknown : A extends readonly [unknown, unknown] ? unknown : "NULLIF needs exactly two values" : A extends readonly [] ? `${Uppercase<Name>} needs at least one value` : unknown) & { readonly [K in keyof A]: CheckExpression<A[K], R>; } & CompatibleValues<A[number]>;
|
|
89
89
|
/** Valid inputs need no extra constraint; this keeps spread arrays from losing their fixed final operand. */
|
|
90
|
-
type CheckInput<I> = [I] extends [CheckExpression<I, Exclude<BranchResult<I>, null>>] ? unknown : CheckExpression<I, Exclude<BranchResult<I>, null>>;
|
|
90
|
+
export type CheckInput<I> = [I] extends [CheckExpression<I, Exclude<BranchResult<I>, null>>] ? unknown : CheckExpression<I, Exclude<BranchResult<I>, null>>;
|
|
91
91
|
/**
|
|
92
92
|
* The internal form produced by parsing expression inputs, like ParsedFindQuery for em.find filters.
|
|
93
93
|
* Existing Expr instances remain intact; literal operands and CASE results are parsed recursively.
|
|
94
94
|
* CASE conditions retain their query input until SQL rendering supplies the alias context.
|
|
95
95
|
*/
|
|
96
|
-
type ParsedExpression = BaseExpr | ParsedLiteralExpression | ParsedArrayAggExpression | ParsedCoalesceExpression | ParsedNullIfExpression | ParsedGreatestExpression | ParsedLeastExpression | ParsedCaseExpression;
|
|
96
|
+
export type ParsedExpression = BaseExpr | ParsedLiteralExpression | ParsedArrayAggExpression | ParsedCoalesceExpression | ParsedNullIfExpression | ParsedGreatestExpression | ParsedLeastExpression | ParsedCaseExpression;
|
|
97
97
|
/** A bound value whose encoder is selected from the surrounding expression. */
|
|
98
|
-
interface ParsedLiteralExpression {
|
|
98
|
+
export interface ParsedLiteralExpression {
|
|
99
99
|
kind: "literal";
|
|
100
100
|
value: unknown;
|
|
101
101
|
}
|
|
102
102
|
/** The conversions shared by all result values, separate from their SQL rendering. */
|
|
103
|
-
type ResultCodec = Pick<BaseExpr, "outputType" | "encode" | "decode">;
|
|
103
|
+
export type ResultCodec = Pick<BaseExpr, "outputType" | "encode" | "decode">;
|
|
104
104
|
/** Extracts the aggregate value from compact or expanded ARRAY_AGG input. */
|
|
105
105
|
type ArrayAggValue<A> = A extends {
|
|
106
106
|
readonly value: infer V;
|
|
@@ -110,5 +110,5 @@ type CheckArrayAgg<A, R> = A extends {
|
|
|
110
110
|
readonly value: unknown;
|
|
111
111
|
} ? A extends ArrayAggExpressionOptions ? { readonly [K in keyof A]: K extends "value" ? CheckExpression<A[K], R> : K extends keyof ArrayAggExpressionOptions ? A[K] : never; } : never : CheckExpression<A, R>;
|
|
112
112
|
//#endregion
|
|
113
|
-
export {
|
|
113
|
+
export {};
|
|
114
114
|
//# sourceMappingURL=types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/queries/sql/expressions/types.ts"],"mappings":";;;;;;;;;;UAcU;EACR,MAAM;EACN,UAAU;EACV,UAAU;EACV,QAAQ;EACR,UAAU;EACV,OAAO;;
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../../../src/queries/sql/expressions/types.ts"],"mappings":";;;;;;;;;;UAcU;EACR,MAAM;EACN,UAAU;EACV,UAAU;EACV,QAAQ;EACR,UAAU;EACV,OAAO;;YAIG,WAAW,cAAc;KAChC,mBAAmB,KAAK,uBAAuB,KAAK,6BAA2B;KAC/E,SAAS,KAAK,QAAQ,QAAQ,IAAI;;YAG3B,eACT,WAAW,aAAa,WAAW,iBAAiB,KAAK,cAAc,qBAAqB,wBACvF;cAEM;;YAGF,cAAc,KAAK,KAAK,YAAY,QAAQ,kBAAkB;YAC9D,aAAa;;;;;;YAOb,gBAAgB,GAAG,UAAU,iCAAiC,IAEtE,IACA;YAAsB,mBAAmB;IACvC,YAAY,GAAG,KACf;YAAsB,YAAY,gBAAgB,SAAS;IACzD,UAAU,GAAG,GAAG,KAChB;WAAqB,gBAAgB;IACnC,gBAAgB,cAAc,IAAI,cAClC,UAAU,gBACR;WAAqB;IACnB,gBAAgB,SAAS,OAAO,YAChC;WAAqB;IACnB,cAAc,SAAS,IAAI,KAEvB,QAAQ,gBAAgB,SAAS,YAAY,0BAC/B,cAAc,SAAS,IAAI,qBACjD;WAAqB,YAAY;IAE3B,gBAAgB,aAAa,IAAI,MAChC;WAA6C;qBAClD,aAAa;;KAGtB,aAAa,KAAK,4BAEnB,4BAEE,8BAEE,4BAEE,0BAA0B,OACxB,aAAa,OACb;;;;;KAMP,YAAY,GAAG,UAAU,kBAAkB,QAAQ,aAAa,6BACjE,gBAAgB,GAAG,KACnB,QAAQ,aAAa,0BAA0B,gBAAgB,GAAG;;KAGjE,aAAa,qBAAqB,YAEnC,UAAU,eAAe,KACvB,IACA;WAAqB,gBAAgB;IACnC,aAAa,cAAc,QAC3B,UAAU,gBACR,aAAa;WAAqB;IAA+B,SAAS,QAAQ,SAAS,cAC3F;WAAqB,YAAY;IAC/B,aAAa,aAAa;;KAIjC,cAAc,8BAA8B,UAAU,iBAAiB,0BAA0B,YAAY,KAC9G,QAAQ,gBAAgB,GAAG,0BAA0B,gBAAgB,GAAG,KAAK,cAAc,GAAG,cAC9F,6BAA6B,cAAc,QAErC,QAAQ,gBAAgB,WAAW,0BACrB,gBAAgB,MAAM,mBAAmB,cAAc,QAAQ,8BACjF,gBAAgB,WAAW;;YAGrB,kBAAkB,qBAAqB,aAE/C,UAAU,oBACR,SAAS,yBACT;WAAqB,gBAAgB;IACnC,kBAAkB,cAAc,MAChC,UAAU,gBACR,kBAAkB,SAAS,cAC3B;WAAqB,YAAY;IAC/B,kBAAkB,aAAa;;;;;;KAQtC,iBAAiB,GAAG,MAAM,oBAC7B,oBACI,sBACE,gBAAgB,gBAAgB,QAAQ,gBAAgB;;YAQpD,gBAAgB,GAAG,KAC7B,UAAU,8BAEN;WAAqB,gBAAgB;;WACxB,UAAU,cAAc,GAAG,0BAA0B,OAAO;gBAC3D,KAAK,cAAc,4BAE/B,UAAU,gBACR,UAAU,wBAEI,WAAW,IAAI,UAAU,WAC/B,EAAE,gCACA,cAAc,EAAE,IAAI,GAAG,gCAKjC;WAAqB,YAAY;;WACpB,MAAM,UAAU,GAAG;IAAO,iBAAiB,aAAa,kBACrD,KAAK,cAAc,wBAEjC,yDAEG,+BAEC,2BAEE,WAAW,+BAA+B,SAAS,KAAK;;KAKrE,cAAc,8BAA8B,aAAa,UAAU,MAAM,uCAC3D,wBAEb,sFAGF,2BACK,UAAU,0DACU,WAAW,IAAI,gBAAgB,EAAE,IAAI,QAAO,iBAAiB;;YAG9E,WAAW,MAAM,YAAY,gBAAgB,GAAG,QAAQ,aAAa,wBAE7E,gBAAgB,GAAG,QAAQ,aAAa;;;;;;YAOhC,mBACR,WACA,0BACA,2BACA,2BACA,yBACA,2BACA,wBACA;;iBAGa;EACf;EACA;;;YAIU,cAAc,KAAK;;KAG1B,cAAc,KAAK;WAAqB,aAAa;IAAM,IAAI;;KAG/D,cAAc,GAAG,KAAK;WAAqB;IAC5C,UAAU,wCAEI,WAAW,IAAI,oBACrB,gBAAgB,EAAE,IAAI,KACtB,gBAAgB,4BACd,EAAE,wBAIZ,gBAAgB,GAAG"}
|
|
@@ -16,21 +16,21 @@ interface ExprInputs {
|
|
|
16
16
|
greatest: GreatestInput;
|
|
17
17
|
least: LeastInput;
|
|
18
18
|
}
|
|
19
|
-
type ExprName = Exclude<keyof ExprInputs, "case" | "arrayAgg">;
|
|
19
|
+
export type ExprName = Exclude<keyof ExprInputs, "case" | "arrayAgg">;
|
|
20
20
|
type ExprArgsInput = { [K in ExprName]: { readonly [P in K]: readonly unknown[]; }; }[ExprName];
|
|
21
21
|
type ExprArgs<V> = Extract<V[keyof V & ExprName], readonly unknown[]>;
|
|
22
22
|
/** An expression object used in select or passed to expr, i.e. { coalesce: [a.last_name, a.first_name] }. */
|
|
23
|
-
type ExprInput = { [K in keyof ExprInputs]: ExprInputs[K] & { readonly [P in Exclude<keyof ExprInputs | "else", K>]?: never; }; }[keyof ExprInputs];
|
|
23
|
+
export type ExprInput = { [K in keyof ExprInputs]: ExprInputs[K] & { readonly [P in Exclude<keyof ExprInputs | "else", K>]?: never; }; }[keyof ExprInputs];
|
|
24
24
|
declare const inputBrand: unique symbol;
|
|
25
25
|
/** Retains the input object so query results can account for LEFT joins in each candidate separately. */
|
|
26
|
-
type ExprFromInput<I> = Expr<InputResult<I, []>, ExpressionSources<I>> & {
|
|
26
|
+
export type ExprFromInput<I> = Expr<InputResult<I, []>, ExpressionSources<I>> & {
|
|
27
27
|
readonly [inputBrand]: I;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* Computes the SQL expression type, including null from LEFT joins.
|
|
31
31
|
* I.e. Book.title is string | null when Book is LEFT-joined; COALESCE(Book.title, "Unknown") is string.
|
|
32
32
|
*/
|
|
33
|
-
type ExpressionValue<V, J extends QueryJoinList> = unknown extends V ? V : V extends {
|
|
33
|
+
export type ExpressionValue<V, J extends QueryJoinList> = unknown extends V ? V : V extends {
|
|
34
34
|
readonly [inputBrand]: infer I;
|
|
35
35
|
} ? InputResult<I, J> : V extends {
|
|
36
36
|
readonly [exprBrand]: ExprBrand<infer R, infer S>;
|
|
@@ -63,7 +63,7 @@ type BranchResult<V> = unknown extends V ? never : V extends ExprLike<infer R> ?
|
|
|
63
63
|
/** A fixed non-null candidate guarantees a result; a possibly empty candidate array does not. */
|
|
64
64
|
type CoalesceValue<A extends readonly unknown[], J extends QueryJoinList> = A extends readonly [infer H, ...infer T] ? Exclude<ExpressionValue<H, J>, null> | (null extends ExpressionValue<H, J> ? CoalesceValue<T, J> : never) : A extends readonly [...infer Before, infer Last] ? Exclude<ExpressionValue<A[number], J>, null> | (null extends ExpressionValue<Last, J> ? (null extends CoalesceValue<Before, J> ? null : never) : never) : ExpressionValue<A[number], J> | null;
|
|
65
65
|
/** Conditions affect which value is chosen, but do not make that value nullable through a LEFT join. */
|
|
66
|
-
type ExpressionSources<V> = unknown extends V ? string : V extends ExprLike<unknown> ? V[typeof exprBrand]["__source"] : V extends {
|
|
66
|
+
export type ExpressionSources<V> = unknown extends V ? string : V extends ExprLike<unknown> ? V[typeof exprBrand]["__source"] : V extends {
|
|
67
67
|
readonly arrayAgg: infer A;
|
|
68
68
|
} ? ExpressionSources<ArrayAggValue<A>> : V extends ExprArgsInput ? ExpressionSources<ExprArgs<V>[number]> : V extends {
|
|
69
69
|
readonly case: infer A;
|
|
@@ -75,7 +75,7 @@ type ExpressionSources<V> = unknown extends V ? string : V extends ExprLike<unkn
|
|
|
75
75
|
*/
|
|
76
76
|
type CompatibleValues<V, All = V> = false extends (V extends unknown ? All extends unknown ? CompatibleValue<ExpressionValue<V, []>, ExpressionValue<All, []>> : never : never) ? "Expression values must have compatible types" : unknown;
|
|
77
77
|
/** Checks nested expression shapes and literal fallbacks in one pass; R is the type supplied by existing expressions. */
|
|
78
|
-
type CheckExpression<V, R> = V extends ExprLike<unknown> ? unknown : V extends {
|
|
78
|
+
export type CheckExpression<V, R> = V extends ExprLike<unknown> ? unknown : V extends {
|
|
79
79
|
readonly arrayAgg: infer A;
|
|
80
80
|
} ? {
|
|
81
81
|
readonly arrayAgg: CheckArrayAgg<A, R extends readonly (infer E)[] ? E : never>;
|
|
@@ -87,20 +87,20 @@ type CheckExpression<V, R> = V extends ExprLike<unknown> ? unknown : V extends {
|
|
|
87
87
|
/** Checks fixed argument counts and then each operand; dynamic array lengths are checked at runtime. */
|
|
88
88
|
type CheckOperands<A extends readonly unknown[], Name extends ExprName, R> = (Name extends "nullIf" ? number extends A["length"] ? unknown : A extends readonly [unknown, unknown] ? unknown : "NULLIF needs exactly two values" : A extends readonly [] ? `${Uppercase<Name>} needs at least one value` : unknown) & { readonly [K in keyof A]: CheckExpression<A[K], R>; } & CompatibleValues<A[number]>;
|
|
89
89
|
/** Valid inputs need no extra constraint; this keeps spread arrays from losing their fixed final operand. */
|
|
90
|
-
type CheckInput<I> = [I] extends [CheckExpression<I, Exclude<BranchResult<I>, null>>] ? unknown : CheckExpression<I, Exclude<BranchResult<I>, null>>;
|
|
90
|
+
export type CheckInput<I> = [I] extends [CheckExpression<I, Exclude<BranchResult<I>, null>>] ? unknown : CheckExpression<I, Exclude<BranchResult<I>, null>>;
|
|
91
91
|
/**
|
|
92
92
|
* The internal form produced by parsing expression inputs, like ParsedFindQuery for em.find filters.
|
|
93
93
|
* Existing Expr instances remain intact; literal operands and CASE results are parsed recursively.
|
|
94
94
|
* CASE conditions retain their query input until SQL rendering supplies the alias context.
|
|
95
95
|
*/
|
|
96
|
-
type ParsedExpression = BaseExpr | ParsedLiteralExpression | ParsedArrayAggExpression | ParsedCoalesceExpression | ParsedNullIfExpression | ParsedGreatestExpression | ParsedLeastExpression | ParsedCaseExpression;
|
|
96
|
+
export type ParsedExpression = BaseExpr | ParsedLiteralExpression | ParsedArrayAggExpression | ParsedCoalesceExpression | ParsedNullIfExpression | ParsedGreatestExpression | ParsedLeastExpression | ParsedCaseExpression;
|
|
97
97
|
/** A bound value whose encoder is selected from the surrounding expression. */
|
|
98
|
-
interface ParsedLiteralExpression {
|
|
98
|
+
export interface ParsedLiteralExpression {
|
|
99
99
|
kind: "literal";
|
|
100
100
|
value: unknown;
|
|
101
101
|
}
|
|
102
102
|
/** The conversions shared by all result values, separate from their SQL rendering. */
|
|
103
|
-
type ResultCodec = Pick<BaseExpr, "outputType" | "encode" | "decode">;
|
|
103
|
+
export type ResultCodec = Pick<BaseExpr, "outputType" | "encode" | "decode">;
|
|
104
104
|
/** Extracts the aggregate value from compact or expanded ARRAY_AGG input. */
|
|
105
105
|
type ArrayAggValue<A> = A extends {
|
|
106
106
|
readonly value: infer V;
|
|
@@ -110,5 +110,5 @@ type CheckArrayAgg<A, R> = A extends {
|
|
|
110
110
|
readonly value: unknown;
|
|
111
111
|
} ? A extends ArrayAggExpressionOptions ? { readonly [K in keyof A]: K extends "value" ? CheckExpression<A[K], R> : K extends keyof ArrayAggExpressionOptions ? A[K] : never; } : never : CheckExpression<A, R>;
|
|
112
112
|
//#endregion
|
|
113
|
-
export {
|
|
113
|
+
export {};
|
|
114
114
|
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../../src/queries/sql/expressions/types.ts"],"mappings":";;;;;;;;;;UAcU;EACR,MAAM;EACN,UAAU;EACV,UAAU;EACV,QAAQ;EACR,UAAU;EACV,OAAO;;
|
|
1
|
+
{"version":3,"file":"types.d.mts","names":[],"sources":["../../../../src/queries/sql/expressions/types.ts"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/queries/sql/keywords.d.ts
|
|
2
2
|
/** Conditionally quotes `identifier` if it's a SQL keyword or not snake cased; for trusted idents only. */
|
|
3
|
-
declare function kq(ident: string): string;
|
|
3
|
+
export declare function kq(ident: string): string;
|
|
4
4
|
/**
|
|
5
5
|
* Quotes a possibly-untrusted identifier, i.e. an em.query select key, subquery `as` name, or
|
|
6
6
|
* `a.column` column.
|
|
@@ -10,9 +10,8 @@ declare function kq(ident: string): string;
|
|
|
10
10
|
* keeps display-name keys (`select: { "Book Count": ... }`) working. Names longer than PG's 63-byte
|
|
11
11
|
* identifier limit are still rejected: PG would silently truncate them and break row decoding.
|
|
12
12
|
*/
|
|
13
|
-
declare function safeKq(ident: string): string;
|
|
14
|
-
declare function kqDot(alias: string, column: string): string;
|
|
15
|
-
declare function kqStar(alias: string): string;
|
|
13
|
+
export declare function safeKq(ident: string): string;
|
|
14
|
+
export declare function kqDot(alias: string, column: string): string;
|
|
15
|
+
export declare function kqStar(alias: string): string;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { kq, kqDot, kqStar, safeKq };
|
|
18
17
|
//# sourceMappingURL=keywords.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keywords.d.cts","names":[],"sources":["../../../src/queries/sql/keywords.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"keywords.d.cts","names":[],"sources":["../../../src/queries/sql/keywords.ts"],"mappings":";;wBA4GgB,GAAG;;;;;;;;;;wBAeH,OAAO;wBAMP,MAAM,eAAe;wBAIrB,OAAO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/queries/sql/keywords.d.ts
|
|
2
2
|
/** Conditionally quotes `identifier` if it's a SQL keyword or not snake cased; for trusted idents only. */
|
|
3
|
-
declare function kq(ident: string): string;
|
|
3
|
+
export declare function kq(ident: string): string;
|
|
4
4
|
/**
|
|
5
5
|
* Quotes a possibly-untrusted identifier, i.e. an em.query select key, subquery `as` name, or
|
|
6
6
|
* `a.column` column.
|
|
@@ -10,9 +10,8 @@ declare function kq(ident: string): string;
|
|
|
10
10
|
* keeps display-name keys (`select: { "Book Count": ... }`) working. Names longer than PG's 63-byte
|
|
11
11
|
* identifier limit are still rejected: PG would silently truncate them and break row decoding.
|
|
12
12
|
*/
|
|
13
|
-
declare function safeKq(ident: string): string;
|
|
14
|
-
declare function kqDot(alias: string, column: string): string;
|
|
15
|
-
declare function kqStar(alias: string): string;
|
|
13
|
+
export declare function safeKq(ident: string): string;
|
|
14
|
+
export declare function kqDot(alias: string, column: string): string;
|
|
15
|
+
export declare function kqStar(alias: string): string;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { kq, kqDot, kqStar, safeKq };
|
|
18
17
|
//# sourceMappingURL=keywords.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keywords.d.mts","names":[],"sources":["../../../src/queries/sql/keywords.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"keywords.d.mts","names":[],"sources":["../../../src/queries/sql/keywords.ts"],"mappings":";;wBA4GgB,GAAG;;;;;;;;;;wBAeH,OAAO;wBAMP,MAAM,eAAe;wBAIrB,OAAO"}
|
|
@@ -168,7 +168,7 @@ sql.condition = function condition(strings, ...values) {
|
|
|
168
168
|
* `EntityManager.query` runs the plan; this module deliberately does not import `EntityManager` (see
|
|
169
169
|
* `EntityHydrator`), so it parses and hands back `{ sql, bindings, decodeRows }` instead of executing.
|
|
170
170
|
*/
|
|
171
|
-
function
|
|
171
|
+
function parseRootQuery(arg) {
|
|
172
172
|
if (arg instanceof SubqueryExpr) require_utils.fail("Scalar query values are expressions, not executable read inputs");
|
|
173
173
|
return parseQuery(toQuery(arg), void 0, new require_queries_sql_AliasAssigner.AliasAssigner());
|
|
174
174
|
}
|
|
@@ -220,6 +220,7 @@ function projectionToSql(select, ctx, joins) {
|
|
|
220
220
|
var SubqueryHandle = class {
|
|
221
221
|
recursive;
|
|
222
222
|
#q;
|
|
223
|
+
#output;
|
|
223
224
|
constructor(q, recursive = false) {
|
|
224
225
|
this.recursive = recursive;
|
|
225
226
|
this.#q = q;
|
|
@@ -228,13 +229,17 @@ var SubqueryHandle = class {
|
|
|
228
229
|
return this.#q;
|
|
229
230
|
}
|
|
230
231
|
/**
|
|
231
|
-
* Gives a recursive CTE its finished body.
|
|
232
|
-
*
|
|
233
|
-
*
|
|
232
|
+
* Gives a recursive CTE its finished body.
|
|
233
|
+
*
|
|
234
|
+
* `recursiveQuery(name, base, step)` cannot hand us the real body up front: it has to call `step` to
|
|
235
|
+
* get it, and `step` needs this handle first, because the recursive half of the query references the
|
|
236
|
+
* CTE's own columns. So the handle starts out holding `base` alone, and the real body, `base UNION
|
|
237
|
+
* step`, arrives here afterwards. Either way PostgreSQL takes the CTE's column names from `base`.
|
|
234
238
|
*/
|
|
235
239
|
setBody(q) {
|
|
236
240
|
if (!this.recursive) require_utils.fail("Only a recursive CTE replaces its body");
|
|
237
241
|
this.#q = q;
|
|
242
|
+
this.#output = void 0;
|
|
238
243
|
}
|
|
239
244
|
get name() {
|
|
240
245
|
return this.q.as;
|
|
@@ -243,15 +248,27 @@ var SubqueryHandle = class {
|
|
|
243
248
|
columnKeys() {
|
|
244
249
|
const output = this.output();
|
|
245
250
|
if (output.kind === "pojo") return output.columns.map(([key]) => key);
|
|
246
|
-
return require_utils.fail(`A
|
|
251
|
+
return require_utils.fail(`A query value with an entity or scalar select has no columns`);
|
|
247
252
|
}
|
|
248
253
|
/** The inner expression behind `key`, for its decoder/encoder. */
|
|
249
254
|
columnExpr(key) {
|
|
250
|
-
return this.output().columns.find(([name]) => name === key)?.[1] ?? require_utils.fail(`
|
|
255
|
+
return this.output().columns.find(([name]) => name === key)?.[1] ?? require_utils.fail(`Query value ${this.describe()} has no column ${key}`);
|
|
251
256
|
}
|
|
252
|
-
/**
|
|
257
|
+
/**
|
|
258
|
+
* The output columns, in order, with the codec for each; worked out without generating any SQL.
|
|
259
|
+
*
|
|
260
|
+
* Cached, because the answer is expensive to work out and gets asked for a lot:
|
|
261
|
+
*
|
|
262
|
+
* - `queryOutput` re-checks the whole query, converts a `join: { books: ... }` relationship tree
|
|
263
|
+
* back into a flat list of joins, and repeats all of that for every operand of a set query.
|
|
264
|
+
* - A `query(...)` value has no real properties. `bookStats.n` runs a `Proxy` get that builds a new
|
|
265
|
+
* column expression, and building one needs this method's answer to find `n`. So selecting two of
|
|
266
|
+
* a value's columns asked for the whole shape twice, before parsing then asked a third time.
|
|
267
|
+
*
|
|
268
|
+
* `setBody` is the only thing that changes the shape, so it is the only thing that clears this.
|
|
269
|
+
*/
|
|
253
270
|
output() {
|
|
254
|
-
return queryOutput(this.q);
|
|
271
|
+
return this.#output ??= queryOutput(this.q);
|
|
255
272
|
}
|
|
256
273
|
column(key) {
|
|
257
274
|
return new SubqueryColumnExpr(this, key, this.columnExpr(key));
|
|
@@ -477,15 +494,15 @@ function queryOutput(q) {
|
|
|
477
494
|
validateReadQuery(q);
|
|
478
495
|
if (isSetQuery(q)) {
|
|
479
496
|
const [operation, operands] = setOperands(q);
|
|
480
|
-
const first = queryOutput(toQuery(operands[0]));
|
|
497
|
+
const first = requirePojoOperand(queryOutput(toQuery(operands[0])));
|
|
481
498
|
const columns = [...first.columns];
|
|
482
|
-
for (const operand of operands) {
|
|
483
|
-
const output =
|
|
484
|
-
if (output.kind !== "pojo") require_utils.fail(output.kind === "entity" ? "Set operations do not support entity-mode operands" : "Set operations require POJO operands; wrap scalar expressions in a named select projection");
|
|
499
|
+
for (const operand of operands.slice(1)) {
|
|
500
|
+
const output = requirePojoOperand(queryOutput(toQuery(operand)));
|
|
485
501
|
if (output.columns.length !== first.columns.length) require_utils.fail("Set operands must have the same POJO keys");
|
|
502
|
+
const byKey = new Map(output.columns);
|
|
486
503
|
for (let i = 0; i < columns.length; i++) {
|
|
487
504
|
const [key, expr] = columns[i];
|
|
488
|
-
const other =
|
|
505
|
+
const other = byKey.get(key);
|
|
489
506
|
if (!other) require_utils.fail(`Set operands must have the same POJO keys; missing '${key}'`);
|
|
490
507
|
const left = expr.outputType;
|
|
491
508
|
const right = other.outputType;
|
|
@@ -512,6 +529,11 @@ function queryOutput(q) {
|
|
|
512
529
|
if (isSubqueryValue(select)) return readValueHandle(select).output();
|
|
513
530
|
return joinedOutput(projectionOutput(select), q.join);
|
|
514
531
|
}
|
|
532
|
+
/** Only named POJO operands combine; entity and scalar reads have no columns to line up. */
|
|
533
|
+
function requirePojoOperand(output) {
|
|
534
|
+
if (output.kind !== "pojo") require_utils.fail(output.kind === "entity" ? "Set operations do not support entity-mode operands" : "Set operations require POJO operands; wrap scalar expressions in a named select projection");
|
|
535
|
+
return output;
|
|
536
|
+
}
|
|
515
537
|
/** Validates the projection before compiling SQL or exposing reusable query columns. */
|
|
516
538
|
function projectionOutput(select) {
|
|
517
539
|
if (require_queries_sql_Expr.isExpr(select)) return {
|
|
@@ -642,17 +664,12 @@ function parseSetQuery(q, parent, assigner, recursiveSelf) {
|
|
|
642
664
|
sql += " OFFSET ?";
|
|
643
665
|
bindings.push(q.offset);
|
|
644
666
|
}
|
|
645
|
-
const
|
|
646
|
-
if (keptCtes.length > 0) {
|
|
647
|
-
const clause = withFragment(keptCtes);
|
|
648
|
-
sql = clause.sql + sql;
|
|
649
|
-
bindings.unshift(...clause.bindings);
|
|
650
|
-
}
|
|
667
|
+
const withCtes = prependCtes(ctes, new Set(plans.flatMap((plan) => plan.outerRefs)), sql, bindings);
|
|
651
668
|
const cteAliases = new Set(ctes.map((cte) => cte.alias));
|
|
652
669
|
const outerRefs = [...ctx.outerRefs, ...plans.flatMap((plan) => plan.outerRefs)];
|
|
653
670
|
return {
|
|
654
|
-
sql,
|
|
655
|
-
bindings,
|
|
671
|
+
sql: withCtes.sql,
|
|
672
|
+
bindings: withCtes.bindings,
|
|
656
673
|
outerRefs: [...new Set(outerRefs.filter((ref) => !cteAliases.has(ref)))],
|
|
657
674
|
output,
|
|
658
675
|
decodeRows: (_, rows) => rows.map((row) => decodeRow(row, output.columns))
|
|
@@ -777,7 +794,7 @@ var Ctx = class {
|
|
|
777
794
|
}
|
|
778
795
|
};
|
|
779
796
|
function describeHandle(handle) {
|
|
780
|
-
if (handle instanceof SubqueryHandle) return `
|
|
797
|
+
if (handle instanceof SubqueryHandle) return `Query value ${handle.describe()}`;
|
|
781
798
|
if (handle instanceof require_queries_sql_Tables.JoinTableHandle) return `Join table ${handle.joinTableName}`;
|
|
782
799
|
if ("tableName" in handle) return `Table for ${handle.tableName}`;
|
|
783
800
|
return "Table";
|
|
@@ -1294,19 +1311,19 @@ function checkCondition(value) {
|
|
|
1294
1311
|
if ("and" in condition || "or" in condition) {
|
|
1295
1312
|
if ("and" in condition === "or" in condition) require_utils.fail("Query conditions require exactly one and/or group");
|
|
1296
1313
|
const key = "and" in condition ? "and" : "or";
|
|
1297
|
-
|
|
1314
|
+
checkPojoKeys(condition, [key, "pruneIfUndefined"], "Query condition group");
|
|
1298
1315
|
if (!Array.isArray(condition[key])) require_utils.fail("Query condition groups require an array");
|
|
1299
1316
|
if (condition.pruneIfUndefined !== void 0 && condition.pruneIfUndefined !== "any" && condition.pruneIfUndefined !== "all") require_utils.fail("Invalid query pruneIfUndefined policy");
|
|
1300
1317
|
for (const child of condition[key]) checkCondition(child);
|
|
1301
1318
|
} else if ("exists" in condition || "notExists" in condition) {
|
|
1302
1319
|
const key = "exists" in condition ? "exists" : "notExists";
|
|
1303
|
-
|
|
1320
|
+
checkPojoKeys(condition, [key], "Query existence condition");
|
|
1304
1321
|
const query = condition[key];
|
|
1305
1322
|
if (query === void 0) return;
|
|
1306
1323
|
if (!(query instanceof SubqueryExpr) && !isReadQueryValue(query)) require_utils.fail(`Query ${key} requires a query(...) value`);
|
|
1307
1324
|
toQuery(query);
|
|
1308
1325
|
} else if (condition.kind === "raw") {
|
|
1309
|
-
|
|
1326
|
+
checkPojoKeys(condition, [
|
|
1310
1327
|
"kind",
|
|
1311
1328
|
"aliases",
|
|
1312
1329
|
"condition",
|
|
@@ -1317,7 +1334,7 @@ function checkCondition(value) {
|
|
|
1317
1334
|
], "Query raw condition");
|
|
1318
1335
|
if (typeof condition.condition !== "string" || !Array.isArray(condition.aliases) || !condition.aliases.every((alias) => typeof alias === "string") || !Array.isArray(condition.bindings) || typeof condition.pruneable !== "boolean") require_utils.fail("Malformed query raw condition");
|
|
1319
1336
|
} else if (condition.kind === "column") {
|
|
1320
|
-
|
|
1337
|
+
checkPojoKeys(condition, [
|
|
1321
1338
|
"kind",
|
|
1322
1339
|
"alias",
|
|
1323
1340
|
"column",
|
|
@@ -1329,7 +1346,7 @@ function checkCondition(value) {
|
|
|
1329
1346
|
if (typeof condition.alias !== "string" || typeof condition.column !== "string" || typeof condition.dbType !== "string" || condition.pruneable !== void 0 && typeof condition.pruneable !== "boolean") require_utils.fail("Malformed query column condition");
|
|
1330
1347
|
const filter = condition.cond;
|
|
1331
1348
|
if (!filter) require_utils.fail("Malformed query column filter");
|
|
1332
|
-
|
|
1349
|
+
checkPojoKeys(filter, ["kind", "value"], "Query column filter");
|
|
1333
1350
|
const unary = filter.kind === "is-null" || filter.kind === "not-null";
|
|
1334
1351
|
if (!unary && (![
|
|
1335
1352
|
"eq",
|
|
@@ -1360,8 +1377,18 @@ function checkCondition(value) {
|
|
|
1360
1377
|
if (unary && "value" in filter) require_utils.fail("Unary query filters do not accept values");
|
|
1361
1378
|
} else require_utils.fail("Unknown query condition");
|
|
1362
1379
|
}
|
|
1363
|
-
/**
|
|
1364
|
-
|
|
1380
|
+
/**
|
|
1381
|
+
* Accepts only own enumerable POJO fields, so nothing a caller supplied can be silently ignored: the
|
|
1382
|
+
* compilers read these POJOs back with `Object.entries`/`Object.keys`, which skip inherited,
|
|
1383
|
+
* non-enumerable, and symbol keys, so a field hidden behind one of those would never reach the SQL.
|
|
1384
|
+
* I.e. an UPDATE whose `set` carries `title` on a prototype would leave `title` unchanged and still
|
|
1385
|
+
* report success.
|
|
1386
|
+
*
|
|
1387
|
+
* Conditions, mutation clauses, and assignment POJOs all share this rule; `allowed` may include symbol
|
|
1388
|
+
* keys, i.e. a condition's predicate brand and SQL resolver. Read-query clauses instead use
|
|
1389
|
+
* `validateQueryKeys`, which walks the prototype chain and reports mutation clauses by name.
|
|
1390
|
+
*/
|
|
1391
|
+
function checkPojoKeys(value, allowed, description) {
|
|
1365
1392
|
if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) require_utils.fail(`${description} must be a plain POJO`);
|
|
1366
1393
|
for (const key of Reflect.ownKeys(value)) {
|
|
1367
1394
|
if (!allowed.includes(key)) require_utils.fail(`${description} does not support '${String(key)}'`);
|
|
@@ -1512,6 +1539,24 @@ function withEntryHandle(entry) {
|
|
|
1512
1539
|
return readValueHandle(entry);
|
|
1513
1540
|
}
|
|
1514
1541
|
/**
|
|
1542
|
+
* Puts a statement's surviving `with` entries in front of it, dropping the ones nothing reads.
|
|
1543
|
+
*
|
|
1544
|
+
* `referenced` is the aliases the rest of the statement used. The WITH clause leads the statement, so
|
|
1545
|
+
* its bindings lead the statement's bindings too.
|
|
1546
|
+
*/
|
|
1547
|
+
function prependCtes(ctes, referenced, sql, bindings) {
|
|
1548
|
+
const kept = pruneCtes(ctes, referenced);
|
|
1549
|
+
if (kept.length === 0) return {
|
|
1550
|
+
sql,
|
|
1551
|
+
bindings
|
|
1552
|
+
};
|
|
1553
|
+
const clause = withFragment(kept);
|
|
1554
|
+
return {
|
|
1555
|
+
sql: clause.sql + sql,
|
|
1556
|
+
bindings: [...clause.bindings, ...bindings]
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1515
1560
|
* Drops the CTEs that nothing reads, given the aliases the rest of the statement referenced.
|
|
1516
1561
|
*
|
|
1517
1562
|
* A CTE can only read earlier siblings, so going last to first means every CTE that could read this one
|
|
@@ -1590,12 +1635,14 @@ function typedSql(strings, ...values) {
|
|
|
1590
1635
|
//#endregion
|
|
1591
1636
|
exports.Ctx = Ctx;
|
|
1592
1637
|
exports.SubqueryHandle = SubqueryHandle;
|
|
1638
|
+
exports.checkPojoKeys = checkPojoKeys;
|
|
1593
1639
|
exports.conditionToSql = conditionToSql;
|
|
1594
1640
|
exports.entityQueryBrand = entityQueryBrand;
|
|
1595
1641
|
exports.injectedConditions = injectedConditions;
|
|
1596
1642
|
exports.isReadQueryValue = isReadQueryValue;
|
|
1597
1643
|
exports.parseNestedQuery = parseNestedQuery;
|
|
1598
|
-
exports.
|
|
1644
|
+
exports.parseRootQuery = parseRootQuery;
|
|
1645
|
+
exports.prependCtes = prependCtes;
|
|
1599
1646
|
exports.projectionToSql = projectionToSql;
|
|
1600
1647
|
exports.pruneCtes = pruneCtes;
|
|
1601
1648
|
exports.query = query;
|