joist-core 2.4.0 → 2.5.0-next.10
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.cjs +9 -3
- package/build/BaseEntity.cjs.map +1 -1
- package/build/BaseEntity.d.cts +7 -8
- package/build/BaseEntity.d.cts.map +1 -1
- package/build/BaseEntity.d.mts +7 -8
- package/build/BaseEntity.d.mts.map +1 -1
- package/build/BaseEntity.js +9 -3
- package/build/BaseEntity.js.map +1 -1
- package/build/Entity.cjs +2 -3
- package/build/Entity.d.cts +3 -6
- package/build/Entity.d.cts.map +1 -1
- package/build/Entity.d.mts +3 -6
- package/build/Entity.d.mts.map +1 -1
- package/build/Entity.js +2 -3
- package/build/EntityFields.d.cts +3 -6
- package/build/EntityFields.d.cts.map +1 -1
- package/build/EntityFields.d.mts +3 -6
- package/build/EntityFields.d.mts.map +1 -1
- package/build/EntityManager.cjs +150 -68
- package/build/EntityManager.cjs.map +1 -1
- package/build/EntityManager.d.cts +126 -83
- package/build/EntityManager.d.cts.map +1 -1
- package/build/EntityManager.d.mts +126 -83
- package/build/EntityManager.d.mts.map +1 -1
- package/build/EntityManager.js +149 -69
- package/build/EntityManager.js.map +1 -1
- package/build/EntityMetadata.cjs +3 -5
- package/build/EntityMetadata.cjs.map +1 -1
- package/build/EntityMetadata.d.cts +54 -41
- package/build/EntityMetadata.d.cts.map +1 -1
- package/build/EntityMetadata.d.mts +54 -41
- package/build/EntityMetadata.d.mts.map +1 -1
- package/build/EntityMetadata.js +3 -5
- package/build/EntityMetadata.js.map +1 -1
- package/build/EnumMetadata.d.cts +1 -4
- package/build/EnumMetadata.d.cts.map +1 -1
- package/build/EnumMetadata.d.mts +1 -4
- package/build/EnumMetadata.d.mts.map +1 -1
- package/build/IndexManager.cjs +28 -9
- package/build/IndexManager.cjs.map +1 -1
- package/build/IndexManager.d.cts +3 -6
- package/build/IndexManager.d.cts.map +1 -1
- package/build/IndexManager.d.mts +3 -6
- package/build/IndexManager.d.mts.map +1 -1
- package/build/IndexManager.js +28 -9
- package/build/IndexManager.js.map +1 -1
- package/build/InstanceData.cjs +9 -5
- package/build/InstanceData.cjs.map +1 -1
- package/build/InstanceData.d.cts +9 -7
- package/build/InstanceData.d.cts.map +1 -1
- package/build/InstanceData.d.mts +9 -7
- package/build/InstanceData.d.mts.map +1 -1
- package/build/InstanceData.js +9 -5
- package/build/InstanceData.js.map +1 -1
- package/build/PluginManager.cjs +3 -4
- package/build/PluginManager.cjs.map +1 -1
- package/build/PluginManager.d.cts +11 -10
- package/build/PluginManager.d.cts.map +1 -1
- package/build/PluginManager.d.mts +11 -10
- package/build/PluginManager.d.mts.map +1 -1
- package/build/PluginManager.js +3 -4
- package/build/PluginManager.js.map +1 -1
- package/build/RowData.cjs +1 -2
- package/build/RowData.d.cts +3 -6
- package/build/RowData.d.cts.map +1 -1
- package/build/RowData.d.mts +3 -6
- package/build/RowData.d.mts.map +1 -1
- package/build/RowData.js +1 -2
- package/build/_virtual/_rolldown/runtime.cjs +1 -2
- package/build/batchloaders/BatchLoader.cjs +1 -2
- package/build/batchloaders/BatchLoader.cjs.map +1 -1
- package/build/batchloaders/BatchLoader.d.cts +1 -4
- package/build/batchloaders/BatchLoader.d.cts.map +1 -1
- package/build/batchloaders/BatchLoader.d.mts +1 -4
- package/build/batchloaders/BatchLoader.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.js +1 -2
- package/build/batchloaders/BatchLoader.js.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.cjs +3 -4
- package/build/batchloaders/enumCollectionBatchLoader.d.cts +3 -6
- package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.mts +3 -6
- package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.js +3 -4
- package/build/batchloaders/loadBatchLoader.cjs +5 -6
- package/build/batchloaders/loadBatchLoader.d.cts +4 -7
- package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.mts +4 -7
- package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/loadBatchLoader.js +5 -6
- package/build/batchloaders/manyToManyBatchLoader.cjs +4 -5
- package/build/batchloaders/manyToManyBatchLoader.d.cts +3 -6
- package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.mts +3 -6
- package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.js +4 -5
- package/build/batchloaders/oneToManyBatchLoader.cjs +5 -6
- package/build/batchloaders/oneToManyBatchLoader.d.cts +4 -7
- package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.mts +4 -7
- package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.js +5 -6
- package/build/batchloaders/oneToOneBatchLoader.cjs +6 -7
- package/build/batchloaders/oneToOneBatchLoader.d.cts +4 -7
- package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.mts +4 -7
- package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.js +6 -7
- package/build/batchloaders/populateBatchLoader.cjs +11 -12
- package/build/batchloaders/populateBatchLoader.d.cts +4 -7
- package/build/batchloaders/populateBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.mts +4 -7
- package/build/batchloaders/populateBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/populateBatchLoader.js +11 -12
- package/build/batchloaders/recursiveChildrenBatchLoader.cjs +7 -8
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +4 -7
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +4 -7
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.js +7 -8
- package/build/batchloaders/recursiveM2mBatchLoader.cjs +5 -6
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts +4 -7
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts +4 -7
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.js +5 -6
- package/build/batchloaders/recursiveParentsBatchLoader.cjs +7 -8
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts +4 -7
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts +4 -7
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.js +7 -8
- package/build/changes.cjs +8 -9
- package/build/changes.cjs.map +1 -1
- package/build/changes.d.cts +12 -15
- package/build/changes.d.cts.map +1 -1
- package/build/changes.d.mts +12 -15
- package/build/changes.d.mts.map +1 -1
- package/build/changes.js +8 -9
- package/build/changes.js.map +1 -1
- package/build/config.cjs +171 -33
- package/build/config.cjs.map +1 -1
- package/build/config.d.cts +115 -25
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +115 -25
- package/build/config.d.mts.map +1 -1
- package/build/config.js +171 -33
- package/build/config.js.map +1 -1
- package/build/configure.cjs +40 -11
- package/build/configure.cjs.map +1 -1
- package/build/configure.d.cts +11 -14
- package/build/configure.d.cts.map +1 -1
- package/build/configure.d.mts +11 -14
- package/build/configure.d.mts.map +1 -1
- package/build/configure.js +40 -11
- package/build/configure.js.map +1 -1
- package/build/dataloaders/buildCandidateBatchQuery.cjs +499 -0
- package/build/dataloaders/buildCandidateBatchQuery.cjs.map +1 -0
- package/build/dataloaders/buildCandidateBatchQuery.d.cts +57 -0
- package/build/dataloaders/buildCandidateBatchQuery.d.cts.map +1 -0
- package/build/dataloaders/buildCandidateBatchQuery.d.mts +57 -0
- package/build/dataloaders/buildCandidateBatchQuery.d.mts.map +1 -0
- package/build/dataloaders/buildCandidateBatchQuery.js +498 -0
- package/build/dataloaders/buildCandidateBatchQuery.js.map +1 -0
- package/build/dataloaders/collectFindArguments.cjs +48 -0
- package/build/dataloaders/collectFindArguments.cjs.map +1 -0
- package/build/dataloaders/collectFindArguments.d.cts +31 -0
- package/build/dataloaders/collectFindArguments.d.cts.map +1 -0
- package/build/dataloaders/collectFindArguments.d.mts +31 -0
- package/build/dataloaders/collectFindArguments.d.mts.map +1 -0
- package/build/dataloaders/collectFindArguments.js +47 -0
- package/build/dataloaders/collectFindArguments.js.map +1 -0
- package/build/dataloaders/fastWhereFilterHash.cjs +3 -4
- package/build/dataloaders/fastWhereFilterHash.d.cts +1 -4
- package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.mts +1 -4
- package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.js +3 -4
- package/build/dataloaders/findByUniqueDataLoader.cjs +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.cts +4 -7
- package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.mts +4 -7
- package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.js +2 -3
- package/build/dataloaders/findCountDataLoader.cjs +8 -9
- package/build/dataloaders/findCountDataLoader.d.cts +7 -10
- package/build/dataloaders/findCountDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.mts +7 -10
- package/build/dataloaders/findCountDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findCountDataLoader.js +8 -9
- package/build/dataloaders/findDataLoader.cjs +48 -77
- package/build/dataloaders/findDataLoader.cjs.map +1 -1
- package/build/dataloaders/findDataLoader.d.cts +16 -19
- package/build/dataloaders/findDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findDataLoader.d.mts +16 -19
- package/build/dataloaders/findDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findDataLoader.js +48 -77
- package/build/dataloaders/findDataLoader.js.map +1 -1
- package/build/dataloaders/findIdsDataLoader.cjs +6 -7
- package/build/dataloaders/findIdsDataLoader.d.cts +4 -7
- package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.mts +4 -7
- package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.js +6 -7
- package/build/dataloaders/findOrCreateDataLoader.cjs +12 -9
- package/build/dataloaders/findOrCreateDataLoader.cjs.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.cts +5 -7
- package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.mts +5 -7
- package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.js +12 -9
- package/build/dataloaders/findOrCreateDataLoader.js.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.cjs +16 -19
- package/build/dataloaders/findPaginatedDataLoader.cjs.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.cts +4 -7
- package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.mts +4 -7
- package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.js +16 -19
- package/build/dataloaders/findPaginatedDataLoader.js.map +1 -1
- package/build/dataloaders/lensDataLoader.cjs +5 -6
- package/build/dataloaders/lensDataLoader.d.cts +3 -6
- package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.mts +3 -6
- package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
- package/build/dataloaders/lensDataLoader.js +5 -6
- package/build/dataloaders/manyToManyFindDataLoader.cjs +1 -2
- package/build/dataloaders/manyToManyFindDataLoader.d.cts +4 -7
- package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.mts +4 -7
- package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.js +1 -2
- package/build/dataloaders/oneToManyFindDataLoader.cjs +1 -2
- package/build/dataloaders/oneToManyFindDataLoader.d.cts +4 -7
- package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.mts +4 -7
- package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.js +1 -2
- package/build/defaults.cjs +7 -8
- package/build/defaults.cjs.map +1 -1
- package/build/defaults.d.cts +9 -11
- package/build/defaults.d.cts.map +1 -1
- package/build/defaults.d.mts +9 -11
- package/build/defaults.d.mts.map +1 -1
- package/build/defaults.js +7 -8
- package/build/defaults.js.map +1 -1
- package/build/drivers/Driver.cjs +1 -1
- package/build/drivers/Driver.d.cts +4 -7
- package/build/drivers/Driver.d.cts.map +1 -1
- package/build/drivers/Driver.d.mts +4 -7
- package/build/drivers/Driver.d.mts.map +1 -1
- package/build/drivers/Driver.js +1 -1
- package/build/drivers/EntityWriter.cjs +8 -8
- package/build/drivers/EntityWriter.cjs.map +1 -1
- package/build/drivers/EntityWriter.d.cts +20 -10
- package/build/drivers/EntityWriter.d.cts.map +1 -1
- package/build/drivers/EntityWriter.d.mts +20 -10
- package/build/drivers/EntityWriter.d.mts.map +1 -1
- package/build/drivers/EntityWriter.js +8 -8
- package/build/drivers/EntityWriter.js.map +1 -1
- package/build/drivers/IdAssigner.cjs +7 -4
- package/build/drivers/IdAssigner.cjs.map +1 -1
- package/build/drivers/IdAssigner.d.cts +6 -7
- package/build/drivers/IdAssigner.d.cts.map +1 -1
- package/build/drivers/IdAssigner.d.mts +6 -7
- package/build/drivers/IdAssigner.d.mts.map +1 -1
- package/build/drivers/IdAssigner.js +7 -4
- package/build/drivers/IdAssigner.js.map +1 -1
- package/build/drivers/driverApi.cjs +4 -5
- package/build/drivers/driverApi.d.cts +4 -7
- package/build/drivers/driverApi.d.cts.map +1 -1
- package/build/drivers/driverApi.d.mts +4 -7
- package/build/drivers/driverApi.d.mts.map +1 -1
- package/build/drivers/driverApi.js +4 -5
- package/build/drivers/index.d.cts +1 -1
- package/build/drivers/index.d.mts +1 -1
- package/build/fields.cjs +81 -23
- package/build/fields.cjs.map +1 -1
- package/build/fields.d.cts +12 -13
- package/build/fields.d.cts.map +1 -1
- package/build/fields.d.mts +12 -13
- package/build/fields.d.mts.map +1 -1
- package/build/fields.js +81 -23
- package/build/fields.js.map +1 -1
- package/build/flush/FlushLock.cjs +1 -2
- package/build/flush/FlushLock.cjs.map +1 -1
- package/build/flush/FlushLock.d.cts +1 -4
- package/build/flush/FlushLock.d.cts.map +1 -1
- package/build/flush/FlushLock.d.mts +1 -4
- package/build/flush/FlushLock.d.mts.map +1 -1
- package/build/flush/FlushLock.js +1 -2
- package/build/flush/FlushLock.js.map +1 -1
- package/build/flush/JoinRows.cjs +3 -4
- package/build/flush/JoinRows.cjs.map +1 -1
- package/build/flush/JoinRows.d.cts +7 -10
- package/build/flush/JoinRows.d.cts.map +1 -1
- package/build/flush/JoinRows.d.mts +7 -10
- package/build/flush/JoinRows.d.mts.map +1 -1
- package/build/flush/JoinRows.js +3 -4
- package/build/flush/JoinRows.js.map +1 -1
- package/build/flush/PendingChanges.d.cts +5 -8
- package/build/flush/PendingChanges.d.cts.map +1 -1
- package/build/flush/PendingChanges.d.mts +5 -8
- package/build/flush/PendingChanges.d.mts.map +1 -1
- package/build/flush/ReadDrift.cjs +89 -0
- package/build/flush/ReadDrift.cjs.map +1 -0
- package/build/flush/ReadDrift.d.cts +23 -0
- package/build/flush/ReadDrift.d.cts.map +1 -0
- package/build/flush/ReadDrift.d.mts +23 -0
- package/build/flush/ReadDrift.d.mts.map +1 -0
- package/build/flush/ReadDrift.js +86 -0
- package/build/flush/ReadDrift.js.map +1 -0
- package/build/flush/Todo.cjs +3 -4
- package/build/flush/Todo.d.cts +7 -10
- package/build/flush/Todo.d.cts.map +1 -1
- package/build/flush/Todo.d.mts +7 -10
- package/build/flush/Todo.d.mts.map +1 -1
- package/build/flush/Todo.js +3 -4
- package/build/getProperties.cjs +4 -5
- package/build/getProperties.d.cts +3 -6
- package/build/getProperties.d.cts.map +1 -1
- package/build/getProperties.d.mts +3 -6
- package/build/getProperties.d.mts.map +1 -1
- package/build/getProperties.js +4 -5
- package/build/index.cjs +71 -57
- package/build/index.cjs.map +1 -1
- package/build/index.d.cts +68 -66
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +68 -66
- package/build/index.d.mts.map +1 -1
- package/build/index.js +66 -58
- package/build/index.js.map +1 -1
- package/build/json.cjs +8 -9
- package/build/json.d.cts +13 -15
- package/build/json.d.cts.map +1 -1
- package/build/json.d.mts +13 -15
- package/build/json.d.mts.map +1 -1
- package/build/json.js +8 -9
- package/build/k.cjs +1 -2
- package/build/k.js +1 -2
- package/build/keys.cjs +5 -6
- package/build/keys.d.cts +30 -32
- package/build/keys.d.cts.map +1 -1
- package/build/keys.d.mts +30 -32
- package/build/keys.d.mts.map +1 -1
- package/build/keys.js +5 -6
- package/build/loading/HintTree.cjs +1 -2
- package/build/loading/HintTree.d.cts +5 -8
- package/build/loading/HintTree.d.cts.map +1 -1
- package/build/loading/HintTree.d.mts +5 -8
- package/build/loading/HintTree.d.mts.map +1 -1
- package/build/loading/HintTree.js +1 -2
- package/build/loading/IsLoadedCache.cjs +3 -4
- package/build/loading/IsLoadedCache.cjs.map +1 -1
- package/build/loading/IsLoadedCache.d.cts +3 -6
- package/build/loading/IsLoadedCache.d.cts.map +1 -1
- package/build/loading/IsLoadedCache.d.mts +3 -6
- package/build/loading/IsLoadedCache.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.js +3 -4
- package/build/loading/IsLoadedCache.js.map +1 -1
- package/build/loading/loadHints.cjs +1 -2
- package/build/loading/loadHints.d.cts +21 -23
- package/build/loading/loadHints.d.cts.map +1 -1
- package/build/loading/loadHints.d.mts +21 -23
- package/build/loading/loadHints.d.mts.map +1 -1
- package/build/loading/loadHints.js +1 -2
- package/build/loading/loadLens.cjs +6 -7
- package/build/loading/loadLens.d.cts +15 -17
- package/build/loading/loadLens.d.cts.map +1 -1
- package/build/loading/loadLens.d.mts +15 -17
- package/build/loading/loadLens.d.mts.map +1 -1
- package/build/loading/loadLens.js +6 -7
- package/build/loading/withLoaded.cjs +1 -2
- package/build/loading/withLoaded.d.cts +7 -10
- package/build/loading/withLoaded.d.cts.map +1 -1
- package/build/loading/withLoaded.d.mts +7 -10
- package/build/loading/withLoaded.d.mts.map +1 -1
- package/build/loading/withLoaded.js +1 -2
- package/build/logging/FactoryLogger.cjs +3 -4
- package/build/logging/FactoryLogger.cjs.map +1 -1
- package/build/logging/FactoryLogger.d.cts +4 -7
- package/build/logging/FactoryLogger.d.cts.map +1 -1
- package/build/logging/FactoryLogger.d.mts +4 -7
- package/build/logging/FactoryLogger.d.mts.map +1 -1
- package/build/logging/FactoryLogger.js +4 -5
- package/build/logging/FactoryLogger.js.map +1 -1
- package/build/logging/FieldLogger.cjs +1 -2
- package/build/logging/FieldLogger.cjs.map +1 -1
- package/build/logging/FieldLogger.d.cts +4 -7
- package/build/logging/FieldLogger.d.cts.map +1 -1
- package/build/logging/FieldLogger.d.mts +4 -7
- package/build/logging/FieldLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.js +1 -2
- package/build/logging/FieldLogger.js.map +1 -1
- package/build/logging/ReactionLogger.cjs +3 -4
- package/build/logging/ReactionLogger.d.cts +10 -12
- package/build/logging/ReactionLogger.d.cts.map +1 -1
- package/build/logging/ReactionLogger.d.mts +10 -12
- package/build/logging/ReactionLogger.d.mts.map +1 -1
- package/build/logging/ReactionLogger.js +3 -4
- package/build/metrics/EntityMetrics.cjs +80 -0
- package/build/metrics/EntityMetrics.cjs.map +1 -0
- package/build/metrics/EntityMetrics.d.cts +53 -0
- package/build/metrics/EntityMetrics.d.cts.map +1 -0
- package/build/metrics/EntityMetrics.d.mts +53 -0
- package/build/metrics/EntityMetrics.d.mts.map +1 -0
- package/build/metrics/EntityMetrics.js +78 -0
- package/build/metrics/EntityMetrics.js.map +1 -0
- package/build/newEntity.cjs +6 -7
- package/build/newEntity.cjs.map +1 -1
- package/build/newEntity.d.cts +6 -9
- package/build/newEntity.d.cts.map +1 -1
- package/build/newEntity.d.mts +6 -9
- package/build/newEntity.d.mts.map +1 -1
- package/build/newEntity.js +6 -7
- package/build/newEntity.js.map +1 -1
- package/build/newTestInstance.cjs +10 -10
- package/build/newTestInstance.cjs.map +1 -1
- package/build/newTestInstance.d.cts +24 -26
- package/build/newTestInstance.d.cts.map +1 -1
- package/build/newTestInstance.d.mts +24 -26
- package/build/newTestInstance.d.mts.map +1 -1
- package/build/newTestInstance.js +10 -10
- package/build/newTestInstance.js.map +1 -1
- package/build/normalizeHints.cjs +1 -2
- package/build/normalizeHints.d.cts +8 -11
- package/build/normalizeHints.d.cts.map +1 -1
- package/build/normalizeHints.d.mts +8 -11
- package/build/normalizeHints.d.mts.map +1 -1
- package/build/normalizeHints.js +1 -2
- package/build/nowUTC.cjs +1 -2
- package/build/nowUTC.d.cts +4 -7
- package/build/nowUTC.d.cts.map +1 -1
- package/build/nowUTC.d.mts +4 -7
- package/build/nowUTC.d.mts.map +1 -1
- package/build/nowUTC.js +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.cjs +3 -4
- package/build/plugins/ImmutableEntitiesPlugin.d.cts +2 -5
- package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.mts +2 -5
- package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.js +3 -4
- package/build/plugins/PreloadPlugin.cjs +1 -1
- package/build/plugins/PreloadPlugin.d.cts +7 -10
- package/build/plugins/PreloadPlugin.d.cts.map +1 -1
- package/build/plugins/PreloadPlugin.d.mts +7 -10
- package/build/plugins/PreloadPlugin.d.mts.map +1 -1
- package/build/plugins/PreloadPlugin.js +1 -1
- package/build/preloading/JsonAggregatePreloader.cjs +9 -10
- package/build/preloading/JsonAggregatePreloader.d.cts +4 -7
- package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.mts +4 -7
- package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.js +9 -10
- package/build/preloading/canPreload.cjs +1 -2
- package/build/preloading/canPreload.d.cts +1 -4
- package/build/preloading/canPreload.d.cts.map +1 -1
- package/build/preloading/canPreload.d.mts +1 -4
- package/build/preloading/canPreload.d.mts.map +1 -1
- package/build/preloading/canPreload.js +1 -2
- package/build/preloading/partitionHint.cjs +5 -6
- package/build/preloading/partitionHint.d.cts +2 -5
- package/build/preloading/partitionHint.d.cts.map +1 -1
- package/build/preloading/partitionHint.d.mts +2 -5
- package/build/preloading/partitionHint.d.mts.map +1 -1
- package/build/preloading/partitionHint.js +5 -6
- package/build/queries/ConditionBuilder.cjs +2 -3
- package/build/queries/ConditionBuilder.d.cts +3 -5
- package/build/queries/ConditionBuilder.d.cts.map +1 -1
- package/build/queries/ConditionBuilder.d.mts +3 -5
- package/build/queries/ConditionBuilder.d.mts.map +1 -1
- package/build/queries/ConditionBuilder.js +2 -3
- package/build/queries/conditions.cjs +1 -2
- package/build/queries/conditions.d.cts +11 -14
- package/build/queries/conditions.d.cts.map +1 -1
- package/build/queries/conditions.d.mts +11 -14
- package/build/queries/conditions.d.mts.map +1 -1
- package/build/queries/conditions.js +1 -2
- package/build/queries/entityQueryUtils.cjs +2 -3
- package/build/queries/entityQueryUtils.d.cts +5 -8
- package/build/queries/entityQueryUtils.d.cts.map +1 -1
- package/build/queries/entityQueryUtils.d.mts +5 -8
- package/build/queries/entityQueryUtils.d.mts.map +1 -1
- package/build/queries/entityQueryUtils.js +2 -3
- package/build/queries/find/Aliases.cjs +4 -5
- package/build/queries/find/Aliases.d.cts +21 -23
- package/build/queries/find/Aliases.d.cts.map +1 -1
- package/build/queries/find/Aliases.d.mts +21 -23
- package/build/queries/find/Aliases.d.mts.map +1 -1
- package/build/queries/find/Aliases.js +4 -5
- package/build/queries/find/DeferredAlias.cjs +1 -2
- package/build/queries/find/DeferredAlias.d.cts +7 -10
- package/build/queries/find/DeferredAlias.d.cts.map +1 -1
- package/build/queries/find/DeferredAlias.d.mts +7 -10
- package/build/queries/find/DeferredAlias.d.mts.map +1 -1
- package/build/queries/find/DeferredAlias.js +1 -2
- package/build/queries/find/EntityFilter.cjs +1 -2
- package/build/queries/find/EntityFilter.d.cts +15 -18
- package/build/queries/find/EntityFilter.d.cts.map +1 -1
- package/build/queries/find/EntityFilter.d.mts +15 -18
- package/build/queries/find/EntityFilter.d.mts.map +1 -1
- package/build/queries/find/EntityFilter.js +1 -2
- package/build/queries/find/EntityGraphQLFilter.cjs +1 -2
- package/build/queries/find/EntityGraphQLFilter.d.cts +10 -13
- package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.mts +10 -13
- package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.js +1 -2
- package/build/queries/find/QueryParser.cjs +27 -17
- package/build/queries/find/QueryParser.cjs.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.cjs +3 -3
- package/build/queries/find/QueryParser.collectionJoins.cjs.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.cts +1 -4
- package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.mts +1 -4
- package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.js +3 -3
- package/build/queries/find/QueryParser.collectionJoins.js.map +1 -1
- package/build/queries/find/QueryParser.d.cts +43 -22
- package/build/queries/find/QueryParser.d.cts.map +1 -1
- package/build/queries/find/QueryParser.d.mts +43 -22
- package/build/queries/find/QueryParser.d.mts.map +1 -1
- package/build/queries/find/QueryParser.js +27 -17
- package/build/queries/find/QueryParser.js.map +1 -1
- package/build/queries/find/QueryParser.pruning.cjs +52 -4
- package/build/queries/find/QueryParser.pruning.cjs.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.cts +15 -5
- package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.mts +15 -5
- package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
- package/build/queries/find/QueryParser.pruning.js +52 -4
- package/build/queries/find/QueryParser.pruning.js.map +1 -1
- package/build/queries/find/QueryVisitor.cjs +1 -2
- package/build/queries/find/QueryVisitor.d.cts +4 -6
- package/build/queries/find/QueryVisitor.d.cts.map +1 -1
- package/build/queries/find/QueryVisitor.d.mts +4 -6
- package/build/queries/find/QueryVisitor.d.mts.map +1 -1
- package/build/queries/find/QueryVisitor.js +1 -2
- package/build/queries/find/buildFindQuery.cjs +5 -6
- package/build/queries/find/buildFindQuery.cjs.map +1 -1
- package/build/queries/find/buildFindQuery.d.cts +3 -5
- package/build/queries/find/buildFindQuery.d.cts.map +1 -1
- package/build/queries/find/buildFindQuery.d.mts +3 -5
- package/build/queries/find/buildFindQuery.d.mts.map +1 -1
- package/build/queries/find/buildFindQuery.js +5 -6
- package/build/queries/find/buildFindQuery.js.map +1 -1
- package/build/queries/find/scopes.cjs +1 -2
- package/build/queries/find/scopes.cjs.map +1 -1
- package/build/queries/find/scopes.d.cts +17 -20
- package/build/queries/find/scopes.d.cts.map +1 -1
- package/build/queries/find/scopes.d.mts +17 -20
- package/build/queries/find/scopes.d.mts.map +1 -1
- package/build/queries/find/scopes.js +1 -2
- package/build/queries/find/scopes.js.map +1 -1
- package/build/queries/parsedConditions.cjs +1 -2
- package/build/queries/parsedConditions.d.cts +7 -10
- package/build/queries/parsedConditions.d.cts.map +1 -1
- package/build/queries/parsedConditions.d.mts +7 -10
- package/build/queries/parsedConditions.d.mts.map +1 -1
- package/build/queries/parsedConditions.js +1 -2
- package/build/queries/renderConditions.cjs +3 -4
- package/build/queries/renderConditions.d.cts +3 -6
- package/build/queries/renderConditions.d.cts.map +1 -1
- package/build/queries/renderConditions.d.mts +3 -6
- package/build/queries/renderConditions.d.mts.map +1 -1
- package/build/queries/renderConditions.js +3 -4
- package/build/queries/skipCondition.cjs +1 -2
- package/build/queries/skipCondition.d.cts +1 -4
- package/build/queries/skipCondition.d.cts.map +1 -1
- package/build/queries/skipCondition.d.mts +1 -4
- package/build/queries/skipCondition.d.mts.map +1 -1
- package/build/queries/skipCondition.js +1 -2
- package/build/queries/sql/AliasAssigner.cjs +1 -2
- package/build/queries/sql/AliasAssigner.cjs.map +1 -1
- package/build/queries/sql/AliasAssigner.d.cts +1 -4
- package/build/queries/sql/AliasAssigner.d.cts.map +1 -1
- package/build/queries/sql/AliasAssigner.d.mts +1 -4
- package/build/queries/sql/AliasAssigner.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.js +1 -2
- package/build/queries/sql/AliasAssigner.js.map +1 -1
- package/build/queries/sql/Expr.cjs +41 -4
- package/build/queries/sql/Expr.cjs.map +1 -1
- package/build/queries/sql/Expr.d.cts +47 -31
- package/build/queries/sql/Expr.d.cts.map +1 -1
- package/build/queries/sql/Expr.d.mts +47 -31
- package/build/queries/sql/Expr.d.mts.map +1 -1
- package/build/queries/sql/Expr.js +41 -5
- package/build/queries/sql/Expr.js.map +1 -1
- package/build/queries/sql/JoinTree.cjs +3 -4
- package/build/queries/sql/JoinTree.d.cts +10 -12
- package/build/queries/sql/JoinTree.d.cts.map +1 -1
- package/build/queries/sql/JoinTree.d.mts +10 -12
- package/build/queries/sql/JoinTree.d.mts.map +1 -1
- package/build/queries/sql/JoinTree.js +3 -4
- package/build/queries/sql/Tables.cjs +17 -9
- package/build/queries/sql/Tables.cjs.map +1 -1
- package/build/queries/sql/Tables.d.cts +51 -46
- package/build/queries/sql/Tables.d.cts.map +1 -1
- package/build/queries/sql/Tables.d.mts +51 -46
- package/build/queries/sql/Tables.d.mts.map +1 -1
- package/build/queries/sql/Tables.js +17 -9
- package/build/queries/sql/Tables.js.map +1 -1
- package/build/queries/sql/custom.cjs +1 -2
- package/build/queries/sql/custom.d.cts +16 -18
- package/build/queries/sql/custom.d.cts.map +1 -1
- package/build/queries/sql/custom.d.mts +16 -18
- package/build/queries/sql/custom.d.mts.map +1 -1
- package/build/queries/sql/custom.js +1 -2
- package/build/queries/sql/execute.cjs +74 -96
- package/build/queries/sql/execute.cjs.map +1 -1
- package/build/queries/sql/execute.d.cts +54 -39
- package/build/queries/sql/execute.d.cts.map +1 -1
- package/build/queries/sql/execute.d.mts +54 -39
- package/build/queries/sql/execute.d.mts.map +1 -1
- package/build/queries/sql/execute.js +75 -97
- package/build/queries/sql/execute.js.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.cjs +2 -3
- package/build/queries/sql/expressions/arrayAgg.d.cts +6 -9
- package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.mts +6 -9
- package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.js +2 -3
- package/build/queries/sql/expressions/case.cjs +2 -3
- package/build/queries/sql/expressions/case.d.cts +11 -13
- package/build/queries/sql/expressions/case.d.cts.map +1 -1
- package/build/queries/sql/expressions/case.d.mts +11 -13
- package/build/queries/sql/expressions/case.d.mts.map +1 -1
- package/build/queries/sql/expressions/case.js +2 -3
- package/build/queries/sql/expressions/coalesce.cjs +2 -3
- package/build/queries/sql/expressions/coalesce.d.cts +6 -9
- package/build/queries/sql/expressions/coalesce.d.cts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.mts +6 -9
- package/build/queries/sql/expressions/coalesce.d.mts.map +1 -1
- package/build/queries/sql/expressions/coalesce.js +2 -3
- package/build/queries/sql/expressions/codecs.cjs +2 -3
- package/build/queries/sql/expressions/codecs.d.cts +1 -4
- package/build/queries/sql/expressions/codecs.d.cts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.mts +1 -4
- package/build/queries/sql/expressions/codecs.d.mts.map +1 -1
- package/build/queries/sql/expressions/codecs.js +2 -3
- package/build/queries/sql/expressions/expression.cjs +4 -5
- package/build/queries/sql/expressions/expression.d.cts +8 -10
- package/build/queries/sql/expressions/expression.d.cts.map +1 -1
- package/build/queries/sql/expressions/expression.d.mts +8 -10
- package/build/queries/sql/expressions/expression.d.mts.map +1 -1
- package/build/queries/sql/expressions/expression.js +4 -5
- package/build/queries/sql/expressions/greatest.cjs +2 -3
- package/build/queries/sql/expressions/greatest.d.cts +6 -9
- package/build/queries/sql/expressions/greatest.d.cts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.mts +6 -9
- package/build/queries/sql/expressions/greatest.d.mts.map +1 -1
- package/build/queries/sql/expressions/greatest.js +2 -3
- package/build/queries/sql/expressions/least.cjs +2 -3
- package/build/queries/sql/expressions/least.d.cts +6 -9
- package/build/queries/sql/expressions/least.d.cts.map +1 -1
- package/build/queries/sql/expressions/least.d.mts +6 -9
- package/build/queries/sql/expressions/least.d.mts.map +1 -1
- package/build/queries/sql/expressions/least.js +2 -3
- package/build/queries/sql/expressions/nullIf.cjs +2 -3
- package/build/queries/sql/expressions/nullIf.d.cts +6 -9
- package/build/queries/sql/expressions/nullIf.d.cts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.mts +6 -9
- package/build/queries/sql/expressions/nullIf.d.mts.map +1 -1
- package/build/queries/sql/expressions/nullIf.js +2 -3
- package/build/queries/sql/expressions/parseExpression.cjs +3 -4
- package/build/queries/sql/expressions/parseExpression.d.cts +5 -8
- package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.mts +5 -8
- package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.js +3 -4
- package/build/queries/sql/expressions/types.d.cts +12 -14
- package/build/queries/sql/expressions/types.d.cts.map +1 -1
- package/build/queries/sql/expressions/types.d.mts +12 -14
- package/build/queries/sql/expressions/types.d.mts.map +1 -1
- package/build/queries/sql/keywords.cjs +1 -2
- package/build/queries/sql/keywords.d.cts +4 -7
- package/build/queries/sql/keywords.d.cts.map +1 -1
- package/build/queries/sql/keywords.d.mts +4 -7
- package/build/queries/sql/keywords.d.mts.map +1 -1
- package/build/queries/sql/keywords.js +1 -2
- package/build/queries/sql/query.cjs +86 -40
- package/build/queries/sql/query.cjs.map +1 -1
- package/build/queries/sql/query.d.cts +125 -84
- package/build/queries/sql/query.d.cts.map +1 -1
- package/build/queries/sql/query.d.mts +125 -84
- package/build/queries/sql/query.d.mts.map +1 -1
- package/build/queries/sql/query.js +84 -40
- package/build/queries/sql/query.js.map +1 -1
- package/build/queries/unnest.cjs +5 -7
- package/build/queries/unnest.cjs.map +1 -1
- package/build/queries/unnest.d.cts +3 -6
- package/build/queries/unnest.d.cts.map +1 -1
- package/build/queries/unnest.d.mts +3 -6
- package/build/queries/unnest.d.mts.map +1 -1
- package/build/queries/unnest.js +5 -7
- package/build/queries/unnest.js.map +1 -1
- package/build/queries/valueFilters.cjs +3 -4
- package/build/queries/valueFilters.d.cts +7 -10
- package/build/queries/valueFilters.d.cts.map +1 -1
- package/build/queries/valueFilters.d.mts +7 -10
- package/build/queries/valueFilters.d.mts.map +1 -1
- package/build/queries/valueFilters.js +3 -4
- package/build/reactivity/ReactionsManager.cjs +176 -8
- package/build/reactivity/ReactionsManager.cjs.map +1 -1
- package/build/reactivity/ReactionsManager.d.cts +58 -8
- package/build/reactivity/ReactionsManager.d.cts.map +1 -1
- package/build/reactivity/ReactionsManager.d.mts +58 -8
- package/build/reactivity/ReactionsManager.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.js +176 -8
- package/build/reactivity/ReactionsManager.js.map +1 -1
- package/build/reactivity/reactiveHints.cjs +16 -11
- package/build/reactivity/reactiveHints.cjs.map +1 -1
- package/build/reactivity/reactiveHints.d.cts +26 -27
- package/build/reactivity/reactiveHints.d.cts.map +1 -1
- package/build/reactivity/reactiveHints.d.mts +26 -27
- package/build/reactivity/reactiveHints.d.mts.map +1 -1
- package/build/reactivity/reactiveHints.js +16 -11
- package/build/reactivity/reactiveHints.js.map +1 -1
- package/build/relations/AbstractPropertyImpl.cjs +1 -2
- package/build/relations/AbstractPropertyImpl.cjs.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.cts +1 -4
- package/build/relations/AbstractPropertyImpl.d.cts.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.mts +1 -4
- package/build/relations/AbstractPropertyImpl.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.js +1 -2
- package/build/relations/AbstractPropertyImpl.js.map +1 -1
- package/build/relations/AbstractRelationImpl.cjs +1 -2
- package/build/relations/AbstractRelationImpl.d.cts +1 -4
- package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
- package/build/relations/AbstractRelationImpl.d.mts +1 -4
- package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
- package/build/relations/AbstractRelationImpl.js +1 -2
- package/build/relations/AsyncProperty.cjs +4 -5
- package/build/relations/AsyncProperty.cjs.map +1 -1
- package/build/relations/AsyncProperty.d.cts +7 -10
- package/build/relations/AsyncProperty.d.cts.map +1 -1
- package/build/relations/AsyncProperty.d.mts +7 -10
- package/build/relations/AsyncProperty.d.mts.map +1 -1
- package/build/relations/AsyncProperty.js +4 -5
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs +30 -13
- package/build/relations/AsyncReactiveField.cjs.map +1 -1
- package/build/relations/AsyncReactiveField.d.cts +11 -12
- package/build/relations/AsyncReactiveField.d.cts.map +1 -1
- package/build/relations/AsyncReactiveField.d.mts +11 -12
- package/build/relations/AsyncReactiveField.d.mts.map +1 -1
- package/build/relations/AsyncReactiveField.js +30 -13
- package/build/relations/AsyncReactiveField.js.map +1 -1
- package/build/relations/Collection.cjs +3 -4
- package/build/relations/Collection.d.cts +6 -9
- package/build/relations/Collection.d.cts.map +1 -1
- package/build/relations/Collection.d.mts +6 -9
- package/build/relations/Collection.d.mts.map +1 -1
- package/build/relations/Collection.js +3 -4
- package/build/relations/CustomCollection.cjs +6 -7
- package/build/relations/CustomCollection.cjs.map +1 -1
- package/build/relations/CustomCollection.d.cts +7 -10
- package/build/relations/CustomCollection.d.cts.map +1 -1
- package/build/relations/CustomCollection.d.mts +7 -10
- package/build/relations/CustomCollection.d.mts.map +1 -1
- package/build/relations/CustomCollection.js +6 -7
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs +9 -10
- package/build/relations/CustomReference.cjs.map +1 -1
- package/build/relations/CustomReference.d.cts +9 -12
- package/build/relations/CustomReference.d.cts.map +1 -1
- package/build/relations/CustomReference.d.mts +9 -12
- package/build/relations/CustomReference.d.mts.map +1 -1
- package/build/relations/CustomReference.js +9 -10
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs +5 -6
- package/build/relations/EnumCollection.cjs.map +1 -1
- package/build/relations/EnumCollection.d.cts +8 -10
- package/build/relations/EnumCollection.d.cts.map +1 -1
- package/build/relations/EnumCollection.d.mts +8 -10
- package/build/relations/EnumCollection.d.mts.map +1 -1
- package/build/relations/EnumCollection.js +5 -6
- package/build/relations/EnumCollection.js.map +1 -1
- package/build/relations/LargeCollection.cjs +2 -2
- package/build/relations/LargeCollection.d.cts +3 -6
- package/build/relations/LargeCollection.d.cts.map +1 -1
- package/build/relations/LargeCollection.d.mts +3 -6
- package/build/relations/LargeCollection.d.mts.map +1 -1
- package/build/relations/LargeCollection.js +2 -2
- package/build/relations/LazyField.cjs +23 -10
- package/build/relations/LazyField.cjs.map +1 -1
- package/build/relations/LazyField.d.cts +15 -12
- package/build/relations/LazyField.d.cts.map +1 -1
- package/build/relations/LazyField.d.mts +15 -12
- package/build/relations/LazyField.d.mts.map +1 -1
- package/build/relations/LazyField.js +23 -10
- package/build/relations/LazyField.js.map +1 -1
- package/build/relations/ManyToManyCollection.cjs +7 -8
- package/build/relations/ManyToManyCollection.cjs.map +1 -1
- package/build/relations/ManyToManyCollection.d.cts +4 -7
- package/build/relations/ManyToManyCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyCollection.d.mts +4 -7
- package/build/relations/ManyToManyCollection.d.mts.map +1 -1
- package/build/relations/ManyToManyCollection.js +7 -8
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.cjs +8 -9
- package/build/relations/ManyToManyLargeCollection.d.cts +6 -9
- package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.mts +6 -9
- package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/ManyToManyLargeCollection.js +8 -9
- package/build/relations/ManyToOneReference.cjs +11 -12
- package/build/relations/ManyToOneReference.cjs.map +1 -1
- package/build/relations/ManyToOneReference.d.cts +12 -15
- package/build/relations/ManyToOneReference.d.cts.map +1 -1
- package/build/relations/ManyToOneReference.d.mts +12 -15
- package/build/relations/ManyToOneReference.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.js +11 -12
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs +8 -9
- package/build/relations/OneToManyCollection.cjs.map +1 -1
- package/build/relations/OneToManyCollection.d.cts +5 -8
- package/build/relations/OneToManyCollection.d.cts.map +1 -1
- package/build/relations/OneToManyCollection.d.mts +5 -8
- package/build/relations/OneToManyCollection.d.mts.map +1 -1
- package/build/relations/OneToManyCollection.js +8 -9
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs +7 -8
- package/build/relations/OneToManyLargeCollection.cjs.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.cts +6 -9
- package/build/relations/OneToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.mts +6 -9
- package/build/relations/OneToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/OneToManyLargeCollection.js +7 -8
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs +10 -11
- package/build/relations/OneToOneReference.cjs.map +1 -1
- package/build/relations/OneToOneReference.d.cts +12 -14
- package/build/relations/OneToOneReference.d.cts.map +1 -1
- package/build/relations/OneToOneReference.d.mts +12 -14
- package/build/relations/OneToOneReference.d.mts.map +1 -1
- package/build/relations/OneToOneReference.js +10 -11
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs +13 -14
- package/build/relations/PolymorphicReference.cjs.map +1 -1
- package/build/relations/PolymorphicReference.d.cts +9 -12
- package/build/relations/PolymorphicReference.d.cts.map +1 -1
- package/build/relations/PolymorphicReference.d.mts +9 -12
- package/build/relations/PolymorphicReference.d.mts.map +1 -1
- package/build/relations/PolymorphicReference.js +13 -14
- package/build/relations/PolymorphicReference.js.map +1 -1
- package/build/relations/PropertySymbols.cjs +1 -2
- package/build/relations/PropertySymbols.d.cts +1 -4
- package/build/relations/PropertySymbols.d.cts.map +1 -1
- package/build/relations/PropertySymbols.d.mts +1 -4
- package/build/relations/PropertySymbols.d.mts.map +1 -1
- package/build/relations/PropertySymbols.js +1 -2
- package/build/relations/ReactiveField.cjs +35 -15
- package/build/relations/ReactiveField.cjs.map +1 -1
- package/build/relations/ReactiveField.d.cts +14 -12
- package/build/relations/ReactiveField.d.cts.map +1 -1
- package/build/relations/ReactiveField.d.mts +14 -12
- package/build/relations/ReactiveField.d.mts.map +1 -1
- package/build/relations/ReactiveField.js +35 -15
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs +3 -4
- package/build/relations/ReactiveGetter.cjs.map +1 -1
- package/build/relations/ReactiveGetter.d.cts +6 -9
- package/build/relations/ReactiveGetter.d.cts.map +1 -1
- package/build/relations/ReactiveGetter.d.mts +6 -9
- package/build/relations/ReactiveGetter.d.mts.map +1 -1
- package/build/relations/ReactiveGetter.js +3 -4
- package/build/relations/ReactiveGetter.js.map +1 -1
- package/build/relations/ReactiveManyToMany.cjs +22 -15
- package/build/relations/ReactiveManyToMany.cjs.map +1 -1
- package/build/relations/ReactiveManyToMany.d.cts +8 -11
- package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
- package/build/relations/ReactiveManyToMany.d.mts +8 -11
- package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
- package/build/relations/ReactiveManyToMany.js +22 -15
- package/build/relations/ReactiveManyToMany.js.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.cjs +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.cts +8 -11
- package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.mts +8 -11
- package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.js +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs +12 -13
- package/build/relations/ReactiveReference.cjs.map +1 -1
- package/build/relations/ReactiveReference.d.cts +12 -15
- package/build/relations/ReactiveReference.d.cts.map +1 -1
- package/build/relations/ReactiveReference.d.mts +12 -15
- package/build/relations/ReactiveReference.d.mts.map +1 -1
- package/build/relations/ReactiveReference.js +12 -13
- package/build/relations/ReactiveReference.js.map +1 -1
- package/build/relations/ReadOnlyCollection.cjs +3 -4
- package/build/relations/ReadOnlyCollection.d.cts +5 -8
- package/build/relations/ReadOnlyCollection.d.cts.map +1 -1
- package/build/relations/ReadOnlyCollection.d.mts +5 -8
- package/build/relations/ReadOnlyCollection.d.mts.map +1 -1
- package/build/relations/ReadOnlyCollection.js +3 -4
- package/build/relations/RecursiveCollection.cjs +5 -6
- package/build/relations/RecursiveCollection.cjs.map +1 -1
- package/build/relations/RecursiveCollection.d.cts +13 -15
- package/build/relations/RecursiveCollection.d.cts.map +1 -1
- package/build/relations/RecursiveCollection.d.mts +13 -15
- package/build/relations/RecursiveCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.js +5 -6
- package/build/relations/RecursiveCollection.js.map +1 -1
- package/build/relations/RecursiveCycleError.cjs +1 -2
- package/build/relations/RecursiveCycleError.d.cts +2 -4
- package/build/relations/RecursiveCycleError.d.cts.map +1 -1
- package/build/relations/RecursiveCycleError.d.mts +2 -4
- package/build/relations/RecursiveCycleError.d.mts.map +1 -1
- package/build/relations/RecursiveCycleError.js +1 -2
- package/build/relations/Reference.cjs +4 -5
- package/build/relations/Reference.d.cts +8 -10
- package/build/relations/Reference.d.cts.map +1 -1
- package/build/relations/Reference.d.mts +8 -10
- package/build/relations/Reference.d.mts.map +1 -1
- package/build/relations/Reference.js +4 -5
- package/build/relations/ReferenceSymbols.cjs +1 -2
- package/build/relations/ReferenceSymbols.d.cts +1 -4
- package/build/relations/ReferenceSymbols.d.cts.map +1 -1
- package/build/relations/ReferenceSymbols.d.mts +1 -4
- package/build/relations/ReferenceSymbols.d.mts.map +1 -1
- package/build/relations/ReferenceSymbols.js +1 -2
- package/build/relations/Relation.cjs +3 -4
- package/build/relations/Relation.d.cts +4 -6
- package/build/relations/Relation.d.cts.map +1 -1
- package/build/relations/Relation.d.mts +4 -6
- package/build/relations/Relation.d.mts.map +1 -1
- package/build/relations/Relation.js +3 -4
- package/build/relations/RelationSymbols.cjs +1 -2
- package/build/relations/RelationSymbols.d.cts +2 -5
- package/build/relations/RelationSymbols.d.cts.map +1 -1
- package/build/relations/RelationSymbols.d.mts +2 -5
- package/build/relations/RelationSymbols.d.mts.map +1 -1
- package/build/relations/RelationSymbols.js +1 -2
- package/build/relations/hasAsyncMethod.cjs +25 -7
- package/build/relations/hasAsyncMethod.cjs.map +1 -1
- package/build/relations/hasAsyncMethod.d.cts +10 -11
- package/build/relations/hasAsyncMethod.d.cts.map +1 -1
- package/build/relations/hasAsyncMethod.d.mts +10 -11
- package/build/relations/hasAsyncMethod.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.js +25 -8
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.cjs +4 -5
- package/build/relations/hasManyDerived.d.cts +4 -6
- package/build/relations/hasManyDerived.d.cts.map +1 -1
- package/build/relations/hasManyDerived.d.mts +4 -6
- package/build/relations/hasManyDerived.d.mts.map +1 -1
- package/build/relations/hasManyDerived.js +4 -5
- package/build/relations/hasManyThrough.cjs +3 -4
- package/build/relations/hasManyThrough.d.cts +1 -4
- package/build/relations/hasManyThrough.d.cts.map +1 -1
- package/build/relations/hasManyThrough.d.mts +1 -4
- package/build/relations/hasManyThrough.d.mts.map +1 -1
- package/build/relations/hasManyThrough.js +3 -4
- package/build/relations/hasOneDerived.cjs +5 -6
- package/build/relations/hasOneDerived.d.cts +3 -6
- package/build/relations/hasOneDerived.d.cts.map +1 -1
- package/build/relations/hasOneDerived.d.mts +3 -6
- package/build/relations/hasOneDerived.d.mts.map +1 -1
- package/build/relations/hasOneDerived.js +5 -6
- package/build/relations/hasOneThrough.cjs +3 -4
- package/build/relations/hasOneThrough.d.cts +1 -4
- package/build/relations/hasOneThrough.d.cts.map +1 -1
- package/build/relations/hasOneThrough.d.mts +1 -4
- package/build/relations/hasOneThrough.d.mts.map +1 -1
- package/build/relations/hasOneThrough.js +3 -4
- package/build/relations/hasProperty.cjs +6 -7
- package/build/relations/hasProperty.cjs.map +1 -1
- package/build/relations/hasProperty.d.cts +10 -12
- package/build/relations/hasProperty.d.cts.map +1 -1
- package/build/relations/hasProperty.d.mts +10 -12
- package/build/relations/hasProperty.d.mts.map +1 -1
- package/build/relations/hasProperty.js +6 -7
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/hasReactiveAsyncMethod.cjs +86 -0
- package/build/relations/hasReactiveAsyncMethod.cjs.map +1 -0
- package/build/relations/hasReactiveAsyncMethod.d.cts +30 -0
- package/build/relations/hasReactiveAsyncMethod.d.cts.map +1 -0
- package/build/relations/hasReactiveAsyncMethod.d.mts +30 -0
- package/build/relations/hasReactiveAsyncMethod.d.mts.map +1 -0
- package/build/relations/hasReactiveAsyncMethod.js +84 -0
- package/build/relations/hasReactiveAsyncMethod.js.map +1 -0
- package/build/relations/index.cjs +10 -8
- package/build/relations/index.d.cts +5 -4
- package/build/relations/index.d.mts +5 -4
- package/build/relations/index.js +10 -9
- package/build/relations/isCascadeDelete.cjs +1 -2
- package/build/relations/isCascadeDelete.d.cts +1 -4
- package/build/relations/isCascadeDelete.d.cts.map +1 -1
- package/build/relations/isCascadeDelete.d.mts +1 -4
- package/build/relations/isCascadeDelete.d.mts.map +1 -1
- package/build/relations/isCascadeDelete.js +1 -2
- package/build/resurrection.cjs +15 -6
- package/build/resurrection.cjs.map +1 -1
- package/build/resurrection.d.cts +6 -6
- package/build/resurrection.d.cts.map +1 -1
- package/build/resurrection.d.mts +6 -6
- package/build/resurrection.d.mts.map +1 -1
- package/build/resurrection.js +15 -7
- package/build/resurrection.js.map +1 -1
- package/build/rules.cjs +6 -7
- package/build/rules.cjs.map +1 -1
- package/build/rules.d.cts +28 -25
- package/build/rules.d.cts.map +1 -1
- package/build/rules.d.mts +28 -25
- package/build/rules.d.mts.map +1 -1
- package/build/rules.js +6 -7
- package/build/rules.js.map +1 -1
- package/build/runtimeConfig.cjs +1 -2
- package/build/runtimeConfig.d.cts +4 -7
- package/build/runtimeConfig.d.cts.map +1 -1
- package/build/runtimeConfig.d.mts +4 -7
- package/build/runtimeConfig.d.mts.map +1 -1
- package/build/runtimeConfig.js +1 -2
- package/build/serde/TypeInfo.cjs +1 -2
- package/build/serde/TypeInfo.d.cts +3 -6
- package/build/serde/TypeInfo.d.cts.map +1 -1
- package/build/serde/TypeInfo.d.mts +3 -6
- package/build/serde/TypeInfo.d.mts.map +1 -1
- package/build/serde/TypeInfo.js +1 -2
- package/build/serde/columns.cjs +4 -2
- package/build/serde/columns.cjs.map +1 -1
- package/build/serde/columns.d.cts +5 -7
- package/build/serde/columns.d.cts.map +1 -1
- package/build/serde/columns.d.mts +5 -7
- package/build/serde/columns.d.mts.map +1 -1
- package/build/serde/columns.js +4 -2
- package/build/serde/columns.js.map +1 -1
- package/build/serde/fieldSerde.cjs +7 -5
- package/build/serde/fieldSerde.cjs.map +1 -1
- package/build/serde/fieldSerde.d.cts +14 -15
- package/build/serde/fieldSerde.d.cts.map +1 -1
- package/build/serde/fieldSerde.d.mts +14 -15
- package/build/serde/fieldSerde.d.mts.map +1 -1
- package/build/serde/fieldSerde.js +7 -5
- package/build/serde/fieldSerde.js.map +1 -1
- package/build/serde/serde.cjs +64 -5
- package/build/serde/serde.cjs.map +1 -1
- package/build/serde/serde.d.cts +58 -21
- package/build/serde/serde.d.cts.map +1 -1
- package/build/serde/serde.d.mts +58 -21
- package/build/serde/serde.d.mts.map +1 -1
- package/build/serde/serde.js +64 -6
- package/build/serde/serde.js.map +1 -1
- package/build/serde/temporal.cjs +8 -14
- package/build/serde/temporal.cjs.map +1 -1
- package/build/serde/temporal.d.cts +6 -8
- package/build/serde/temporal.d.cts.map +1 -1
- package/build/serde/temporal.d.mts +6 -8
- package/build/serde/temporal.d.mts.map +1 -1
- package/build/serde/temporal.js +8 -14
- package/build/serde/temporal.js.map +1 -1
- package/build/serde/temporalMappers.cjs +9 -6
- package/build/serde/temporalMappers.cjs.map +1 -1
- package/build/serde/temporalMappers.d.cts +5 -8
- package/build/serde/temporalMappers.d.cts.map +1 -1
- package/build/serde/temporalMappers.d.mts +5 -8
- package/build/serde/temporalMappers.d.mts.map +1 -1
- package/build/serde/temporalMappers.js +9 -6
- package/build/serde/temporalMappers.js.map +1 -1
- package/build/transitions.cjs +90 -0
- package/build/transitions.cjs.map +1 -0
- package/build/transitions.d.cts +113 -0
- package/build/transitions.d.cts.map +1 -0
- package/build/transitions.d.mts +113 -0
- package/build/transitions.d.mts.map +1 -0
- package/build/transitions.js +85 -0
- package/build/transitions.js.map +1 -0
- package/build/trusted.cjs +1 -2
- package/build/trusted.cjs.map +1 -1
- package/build/trusted.d.cts +2 -5
- package/build/trusted.d.cts.map +1 -1
- package/build/trusted.d.mts +2 -5
- package/build/trusted.d.mts.map +1 -1
- package/build/trusted.js +1 -2
- package/build/typeMap.cjs +1 -1
- package/build/typeMap.d.cts +18 -20
- package/build/typeMap.d.cts.map +1 -1
- package/build/typeMap.d.mts +18 -20
- package/build/typeMap.d.mts.map +1 -1
- package/build/typeMap.js +1 -1
- package/build/upsert.cjs +7 -8
- package/build/upsert.d.cts +7 -9
- package/build/upsert.d.cts.map +1 -1
- package/build/upsert.d.mts +7 -9
- package/build/upsert.d.mts.map +1 -1
- package/build/upsert.js +7 -8
- package/build/utils.cjs +3 -4
- package/build/utils.d.cts +29 -32
- package/build/utils.d.cts.map +1 -1
- package/build/utils.d.mts +29 -32
- package/build/utils.d.mts.map +1 -1
- package/build/utils.js +3 -4
- package/package.json +6 -6
package/build/queries/unnest.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/queries/unnest.ts
|
|
3
3
|
/**
|
|
4
4
|
* Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.
|
|
5
5
|
*
|
|
@@ -48,14 +48,12 @@ function fillArrayWithNulls(c, array, maxSize) {
|
|
|
48
48
|
if (c.isNullableArray) result.unshift(wasNull ? null : notNullMarker(c));
|
|
49
49
|
return result;
|
|
50
50
|
}
|
|
51
|
+
/** Return the unnest null/set marker as the physical db type, rejecting null or undefined. */
|
|
51
52
|
function notNullMarker(c) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
else if (c.dbType.startsWith("timestamp")) return /* @__PURE__ */ new Date();
|
|
56
|
-
else throw new Error("Unhandled nullable array column type " + c.dbType);
|
|
53
|
+
const marker = c.notNullMarker;
|
|
54
|
+
if (marker === null || marker === void 0) throw new Error("Missing non-null array marker for column " + c.columnName);
|
|
55
|
+
return marker;
|
|
57
56
|
}
|
|
58
|
-
//#endregion
|
|
59
57
|
exports.buildUnnestCte = buildUnnestCte;
|
|
60
58
|
exports.ensureRectangularArraySizes = ensureRectangularArraySizes;
|
|
61
59
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unnest.cjs","names":[],"sources":["../../src/queries/unnest.ts"],"sourcesContent":["import type { OpColumn } from \"src/drivers/EntityWriter.ts\";\nimport type { ParsedCteClause } from \"src/queries/find/QueryParser.ts\";\n\n/**\n * Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.\n *\n * I.e. `columns = [first_name, last_name]` means columnValues would be all first names,\n * then all last names, i.e.`[[\"f1\",\"f2\"], [\"l1\",\"l2\"]]`.\n *\n * Note that `columnValues` will be mutated if any array columns need to be made rectangular.\n */\nexport function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause {\n // Make any arrays-of-arrays rectangular by filling them with nulls\n ensureRectangularArraySizes(columns, columnValues);\n // Use unnest or unnest_arrays depending on whether the column is an array column\n const selects = columns.map((c) => {\n if (c.dbType.endsWith(\"[]\")) {\n if (c.isNullableArray) {\n return `unnest_arrays(?::${c.dbType}[], true)`;\n } else {\n return `unnest_arrays(?::${c.dbType}[])`;\n }\n } else {\n return `unnest(?::${c.dbType}[])`;\n }\n });\n return {\n alias,\n columns,\n query: { kind: \"raw\", sql: `SELECT ${selects.join(\", \")}`, bindings: columnValues },\n };\n}\n\nexport function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void {\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i];\n if (column.dbType.endsWith(\"[]\")) {\n const values = columnValues[i];\n const fillTo = findArrayMaxSize(values);\n for (let j = 0; j < values.length; j++) {\n values[j] = fillArrayWithNulls(column, values[j], fillTo);\n }\n }\n }\n}\n\nfunction findArrayMaxSize(columnValues: readonly any[][]): number {\n let max = 1; // postgres really doesn't like `{{}}` so always send at least 1 element\n for (let i = 0; i < columnValues.length; i++) max = Math.max(max, columnValues[i]?.length ?? 0);\n return max;\n}\n\n// Because postgres array-of-arrays must be rectangular, we fill all arrays up the same max size\n// to put on the wire, and then later strip the padded nulls during the unnest_arrays call.\nfunction fillArrayWithNulls(c: OpColumn, array: any[] | null, maxSize: number): any[] {\n const wasNull = array === null;\n const result = array ? [...array] : [];\n const nullsToAdd = Math.max(0, maxSize - (array?.length ?? 0));\n for (let i = 0; i < nullsToAdd; i++) result.push(null);\n // Add our unset marker\n if (c.isNullableArray) result.unshift(wasNull ? null : notNullMarker(c));\n return result;\n}\n\
|
|
1
|
+
{"version":3,"file":"unnest.cjs","names":[],"sources":["../../src/queries/unnest.ts"],"sourcesContent":["import type { OpColumn } from \"src/drivers/EntityWriter.ts\";\nimport type { ParsedCteClause } from \"src/queries/find/QueryParser.ts\";\n\n/**\n * Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.\n *\n * I.e. `columns = [first_name, last_name]` means columnValues would be all first names,\n * then all last names, i.e.`[[\"f1\",\"f2\"], [\"l1\",\"l2\"]]`.\n *\n * Note that `columnValues` will be mutated if any array columns need to be made rectangular.\n */\nexport function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause {\n // Make any arrays-of-arrays rectangular by filling them with nulls\n ensureRectangularArraySizes(columns, columnValues);\n // Use unnest or unnest_arrays depending on whether the column is an array column\n const selects = columns.map((c) => {\n if (c.dbType.endsWith(\"[]\")) {\n if (c.isNullableArray) {\n return `unnest_arrays(?::${c.dbType}[], true)`;\n } else {\n return `unnest_arrays(?::${c.dbType}[])`;\n }\n } else {\n return `unnest(?::${c.dbType}[])`;\n }\n });\n return {\n alias,\n columns,\n query: { kind: \"raw\", sql: `SELECT ${selects.join(\", \")}`, bindings: columnValues },\n };\n}\n\nexport function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void {\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i];\n if (column.dbType.endsWith(\"[]\")) {\n const values = columnValues[i];\n const fillTo = findArrayMaxSize(values);\n for (let j = 0; j < values.length; j++) {\n values[j] = fillArrayWithNulls(column, values[j], fillTo);\n }\n }\n }\n}\n\nfunction findArrayMaxSize(columnValues: readonly any[][]): number {\n let max = 1; // postgres really doesn't like `{{}}` so always send at least 1 element\n for (let i = 0; i < columnValues.length; i++) max = Math.max(max, columnValues[i]?.length ?? 0);\n return max;\n}\n\n// Because postgres array-of-arrays must be rectangular, we fill all arrays up the same max size\n// to put on the wire, and then later strip the padded nulls during the unnest_arrays call.\nfunction fillArrayWithNulls(c: OpColumn, array: any[] | null, maxSize: number): any[] {\n const wasNull = array === null;\n const result = array ? [...array] : [];\n const nullsToAdd = Math.max(0, maxSize - (array?.length ?? 0));\n for (let i = 0; i < nullsToAdd; i++) result.push(null);\n // Add our unset marker for unnest\n if (c.isNullableArray) result.unshift(wasNull ? null : notNullMarker(c));\n return result;\n}\n\n/** Return the unnest null/set marker as the physical db type, rejecting null or undefined. */\nfunction notNullMarker(c: OpColumn): unknown {\n const marker = c.notNullMarker;\n if (marker === null || marker === undefined) {\n throw new Error(\"Missing non-null array marker for column \" + c.columnName);\n }\n return marker;\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,eAAe,OAAe,SAAqB,cAAwC;CAEzG,4BAA4B,SAAS,YAAY;CAajD,OAAO;EACL;EACA;EACA,OAAO;GAAE,MAAM;GAAO,KAAK,UAdb,QAAQ,KAAK,MAAM;IACjC,IAAI,EAAE,OAAO,SAAS,IAAI,GAAG;KAC3B,IAAI,EAAE,iBACJ,OAAO,oBAAoB,EAAE,OAAO;UAEpC,OAAO,oBAAoB,EAAE,OAAO;IAExC,OACE,OAAO,aAAa,EAAE,OAAO;GAEjC,CAI6C,CAAC,CAAC,KAAK,IAAI;GAAK,UAAU;EAAa;CACpF;AACF;AAEA,SAAgB,4BAA4B,SAAqB,cAA6B;CAC5F,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,SAAS,QAAQ;EACvB,IAAI,OAAO,OAAO,SAAS,IAAI,GAAG;GAChC,MAAM,SAAS,aAAa;GAC5B,MAAM,SAAS,iBAAiB,MAAM;GACtC,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KACjC,OAAO,KAAK,mBAAmB,QAAQ,OAAO,IAAI,MAAM;EAE5D;CACF;AACF;AAEA,SAAS,iBAAiB,cAAwC;CAChE,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK,MAAM,KAAK,IAAI,KAAK,aAAa,EAAE,EAAE,UAAU,CAAC;CAC9F,OAAO;AACT;AAIA,SAAS,mBAAmB,GAAa,OAAqB,SAAwB;CACpF,MAAM,UAAU,UAAU;CAC1B,MAAM,SAAS,QAAQ,CAAC,GAAG,KAAK,IAAI,CAAC;CACrC,MAAM,aAAa,KAAK,IAAI,GAAG,WAAW,OAAO,UAAU,EAAE;CAC7D,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,KAAK,OAAO,KAAK,IAAI;CAErD,IAAI,EAAE,iBAAiB,OAAO,QAAQ,UAAU,OAAO,cAAc,CAAC,CAAC;CACvE,OAAO;AACT;;AAGA,SAAS,cAAc,GAAsB;CAC3C,MAAM,SAAS,EAAE;CACjB,IAAI,WAAW,QAAQ,WAAW,KAAA,GAChC,MAAM,IAAI,MAAM,8CAA8C,EAAE,UAAU;CAE5E,OAAO;AACT"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ParsedCteClause } from "./find/QueryParser.cjs";
|
|
2
1
|
import { OpColumn } from "../drivers/EntityWriter.cjs";
|
|
3
|
-
|
|
2
|
+
import { ParsedCteClause } from "./find/QueryParser.cjs";
|
|
4
3
|
/**
|
|
5
4
|
* Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.
|
|
6
5
|
*
|
|
@@ -9,8 +8,6 @@ import { OpColumn } from "../drivers/EntityWriter.cjs";
|
|
|
9
8
|
*
|
|
10
9
|
* Note that `columnValues` will be mutated if any array columns need to be made rectangular.
|
|
11
10
|
*/
|
|
12
|
-
declare function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause;
|
|
13
|
-
declare function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { buildUnnestCte, ensureRectangularArraySizes };
|
|
11
|
+
export declare function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause;
|
|
12
|
+
export declare function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void;
|
|
16
13
|
//# sourceMappingURL=unnest.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unnest.d.cts","names":[],"sources":["../../src/queries/unnest.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"unnest.d.cts","names":[],"sources":["../../src/queries/unnest.ts"],"mappings":";;;;;;;;;;wBAWgB,eAAe,eAAe,SAAS,YAAY,wBAAwB;wBAsB3E,4BAA4B,SAAS,YAAY"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ParsedCteClause } from "./find/QueryParser.mjs";
|
|
2
1
|
import { OpColumn } from "../drivers/EntityWriter.mjs";
|
|
3
|
-
|
|
2
|
+
import { ParsedCteClause } from "./find/QueryParser.mjs";
|
|
4
3
|
/**
|
|
5
4
|
* Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.
|
|
6
5
|
*
|
|
@@ -9,8 +8,6 @@ import { OpColumn } from "../drivers/EntityWriter.mjs";
|
|
|
9
8
|
*
|
|
10
9
|
* Note that `columnValues` will be mutated if any array columns need to be made rectangular.
|
|
11
10
|
*/
|
|
12
|
-
declare function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause;
|
|
13
|
-
declare function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { buildUnnestCte, ensureRectangularArraySizes };
|
|
11
|
+
export declare function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause;
|
|
12
|
+
export declare function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void;
|
|
16
13
|
//# sourceMappingURL=unnest.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unnest.d.mts","names":[],"sources":["../../src/queries/unnest.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"unnest.d.mts","names":[],"sources":["../../src/queries/unnest.ts"],"mappings":";;;;;;;;;;wBAWgB,eAAe,eAAe,SAAS,YAAY,wBAAwB;wBAsB3E,4BAA4B,SAAS,YAAY"}
|
package/build/queries/unnest.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/queries/unnest.ts
|
|
2
2
|
/**
|
|
3
3
|
* Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.
|
|
4
4
|
*
|
|
@@ -47,14 +47,12 @@ function fillArrayWithNulls(c, array, maxSize) {
|
|
|
47
47
|
if (c.isNullableArray) result.unshift(wasNull ? null : notNullMarker(c));
|
|
48
48
|
return result;
|
|
49
49
|
}
|
|
50
|
+
/** Return the unnest null/set marker as the physical db type, rejecting null or undefined. */
|
|
50
51
|
function notNullMarker(c) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
else if (c.dbType.startsWith("timestamp")) return /* @__PURE__ */ new Date();
|
|
55
|
-
else throw new Error("Unhandled nullable array column type " + c.dbType);
|
|
52
|
+
const marker = c.notNullMarker;
|
|
53
|
+
if (marker === null || marker === void 0) throw new Error("Missing non-null array marker for column " + c.columnName);
|
|
54
|
+
return marker;
|
|
56
55
|
}
|
|
57
|
-
//#endregion
|
|
58
56
|
export { buildUnnestCte, ensureRectangularArraySizes };
|
|
59
57
|
|
|
60
58
|
//# sourceMappingURL=unnest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unnest.js","names":[],"sources":["../../src/queries/unnest.ts"],"sourcesContent":["import type { OpColumn } from \"src/drivers/EntityWriter.ts\";\nimport type { ParsedCteClause } from \"src/queries/find/QueryParser.ts\";\n\n/**\n * Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.\n *\n * I.e. `columns = [first_name, last_name]` means columnValues would be all first names,\n * then all last names, i.e.`[[\"f1\",\"f2\"], [\"l1\",\"l2\"]]`.\n *\n * Note that `columnValues` will be mutated if any array columns need to be made rectangular.\n */\nexport function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause {\n // Make any arrays-of-arrays rectangular by filling them with nulls\n ensureRectangularArraySizes(columns, columnValues);\n // Use unnest or unnest_arrays depending on whether the column is an array column\n const selects = columns.map((c) => {\n if (c.dbType.endsWith(\"[]\")) {\n if (c.isNullableArray) {\n return `unnest_arrays(?::${c.dbType}[], true)`;\n } else {\n return `unnest_arrays(?::${c.dbType}[])`;\n }\n } else {\n return `unnest(?::${c.dbType}[])`;\n }\n });\n return {\n alias,\n columns,\n query: { kind: \"raw\", sql: `SELECT ${selects.join(\", \")}`, bindings: columnValues },\n };\n}\n\nexport function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void {\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i];\n if (column.dbType.endsWith(\"[]\")) {\n const values = columnValues[i];\n const fillTo = findArrayMaxSize(values);\n for (let j = 0; j < values.length; j++) {\n values[j] = fillArrayWithNulls(column, values[j], fillTo);\n }\n }\n }\n}\n\nfunction findArrayMaxSize(columnValues: readonly any[][]): number {\n let max = 1; // postgres really doesn't like `{{}}` so always send at least 1 element\n for (let i = 0; i < columnValues.length; i++) max = Math.max(max, columnValues[i]?.length ?? 0);\n return max;\n}\n\n// Because postgres array-of-arrays must be rectangular, we fill all arrays up the same max size\n// to put on the wire, and then later strip the padded nulls during the unnest_arrays call.\nfunction fillArrayWithNulls(c: OpColumn, array: any[] | null, maxSize: number): any[] {\n const wasNull = array === null;\n const result = array ? [...array] : [];\n const nullsToAdd = Math.max(0, maxSize - (array?.length ?? 0));\n for (let i = 0; i < nullsToAdd; i++) result.push(null);\n // Add our unset marker\n if (c.isNullableArray) result.unshift(wasNull ? null : notNullMarker(c));\n return result;\n}\n\
|
|
1
|
+
{"version":3,"file":"unnest.js","names":[],"sources":["../../src/queries/unnest.ts"],"sourcesContent":["import type { OpColumn } from \"src/drivers/EntityWriter.ts\";\nimport type { ParsedCteClause } from \"src/queries/find/QueryParser.ts\";\n\n/**\n * Creates a CTE named `alias` that bulk-injects the `columnValues` into a SQL query.\n *\n * I.e. `columns = [first_name, last_name]` means columnValues would be all first names,\n * then all last names, i.e.`[[\"f1\",\"f2\"], [\"l1\",\"l2\"]]`.\n *\n * Note that `columnValues` will be mutated if any array columns need to be made rectangular.\n */\nexport function buildUnnestCte(alias: string, columns: OpColumn[], columnValues: any[][]): ParsedCteClause {\n // Make any arrays-of-arrays rectangular by filling them with nulls\n ensureRectangularArraySizes(columns, columnValues);\n // Use unnest or unnest_arrays depending on whether the column is an array column\n const selects = columns.map((c) => {\n if (c.dbType.endsWith(\"[]\")) {\n if (c.isNullableArray) {\n return `unnest_arrays(?::${c.dbType}[], true)`;\n } else {\n return `unnest_arrays(?::${c.dbType}[])`;\n }\n } else {\n return `unnest(?::${c.dbType}[])`;\n }\n });\n return {\n alias,\n columns,\n query: { kind: \"raw\", sql: `SELECT ${selects.join(\", \")}`, bindings: columnValues },\n };\n}\n\nexport function ensureRectangularArraySizes(columns: OpColumn[], columnValues: any[][]): void {\n for (let i = 0; i < columns.length; i++) {\n const column = columns[i];\n if (column.dbType.endsWith(\"[]\")) {\n const values = columnValues[i];\n const fillTo = findArrayMaxSize(values);\n for (let j = 0; j < values.length; j++) {\n values[j] = fillArrayWithNulls(column, values[j], fillTo);\n }\n }\n }\n}\n\nfunction findArrayMaxSize(columnValues: readonly any[][]): number {\n let max = 1; // postgres really doesn't like `{{}}` so always send at least 1 element\n for (let i = 0; i < columnValues.length; i++) max = Math.max(max, columnValues[i]?.length ?? 0);\n return max;\n}\n\n// Because postgres array-of-arrays must be rectangular, we fill all arrays up the same max size\n// to put on the wire, and then later strip the padded nulls during the unnest_arrays call.\nfunction fillArrayWithNulls(c: OpColumn, array: any[] | null, maxSize: number): any[] {\n const wasNull = array === null;\n const result = array ? [...array] : [];\n const nullsToAdd = Math.max(0, maxSize - (array?.length ?? 0));\n for (let i = 0; i < nullsToAdd; i++) result.push(null);\n // Add our unset marker for unnest\n if (c.isNullableArray) result.unshift(wasNull ? null : notNullMarker(c));\n return result;\n}\n\n/** Return the unnest null/set marker as the physical db type, rejecting null or undefined. */\nfunction notNullMarker(c: OpColumn): unknown {\n const marker = c.notNullMarker;\n if (marker === null || marker === undefined) {\n throw new Error(\"Missing non-null array marker for column \" + c.columnName);\n }\n return marker;\n}\n"],"mappings":";;;;;;;;;AAWA,SAAgB,eAAe,OAAe,SAAqB,cAAwC;CAEzG,4BAA4B,SAAS,YAAY;CAajD,OAAO;EACL;EACA;EACA,OAAO;GAAE,MAAM;GAAO,KAAK,UAdb,QAAQ,KAAK,MAAM;IACjC,IAAI,EAAE,OAAO,SAAS,IAAI,GAAG;KAC3B,IAAI,EAAE,iBACJ,OAAO,oBAAoB,EAAE,OAAO;UAEpC,OAAO,oBAAoB,EAAE,OAAO;IAExC,OACE,OAAO,aAAa,EAAE,OAAO;GAEjC,CAI6C,CAAC,CAAC,KAAK,IAAI;GAAK,UAAU;EAAa;CACpF;AACF;AAEA,SAAgB,4BAA4B,SAAqB,cAA6B;CAC5F,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,SAAS,QAAQ;EACvB,IAAI,OAAO,OAAO,SAAS,IAAI,GAAG;GAChC,MAAM,SAAS,aAAa;GAC5B,MAAM,SAAS,iBAAiB,MAAM;GACtC,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KACjC,OAAO,KAAK,mBAAmB,QAAQ,OAAO,IAAI,MAAM;EAE5D;CACF;AACF;AAEA,SAAS,iBAAiB,cAAwC;CAChE,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK,MAAM,KAAK,IAAI,KAAK,aAAa,EAAE,EAAE,UAAU,CAAC;CAC9F,OAAO;AACT;AAIA,SAAS,mBAAmB,GAAa,OAAqB,SAAwB;CACpF,MAAM,UAAU,UAAU;CAC1B,MAAM,SAAS,QAAQ,CAAC,GAAG,KAAK,IAAI,CAAC;CACrC,MAAM,aAAa,KAAK,IAAI,GAAG,WAAW,OAAO,UAAU,EAAE;CAC7D,KAAK,IAAI,IAAI,GAAG,IAAI,YAAY,KAAK,OAAO,KAAK,IAAI;CAErD,IAAI,EAAE,iBAAiB,OAAO,QAAQ,UAAU,OAAO,cAAc,CAAC,CAAC;CACvE,OAAO;AACT;;AAGA,SAAS,cAAc,GAAsB;CAC3C,MAAM,SAAS,EAAE;CACjB,IAAI,WAAW,QAAQ,WAAW,KAAA,GAChC,MAAM,IAAI,MAAM,8CAA8C,EAAE,UAAU;CAE5E,OAAO;AACT"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_Entity = require("../Entity.cjs");
|
|
3
|
+
const require_EntityManager = require("../EntityManager.cjs");
|
|
2
4
|
const require_queries_find_Aliases = require("./find/Aliases.cjs");
|
|
3
5
|
const require_queries_find_scopes = require("./find/scopes.cjs");
|
|
4
6
|
const require_utils = require("../utils.cjs");
|
|
5
|
-
const require_EntityManager = require("../EntityManager.cjs");
|
|
6
|
-
const require_Entity = require("../Entity.cjs");
|
|
7
7
|
let joist_utils = require("joist-utils");
|
|
8
|
-
|
|
8
|
+
// src/queries/valueFilters.ts
|
|
9
9
|
/** Parses an entity filter, which could be "just an id", an array of ids, or a nested filter. */
|
|
10
10
|
function parseEntityFilter(_meta, filter) {
|
|
11
11
|
if (filter === void 0) return;
|
|
@@ -231,7 +231,6 @@ function shouldPruneValueFilter(key, value) {
|
|
|
231
231
|
function isNotInDb(value) {
|
|
232
232
|
return value.idTaggedMaybe === void 0;
|
|
233
233
|
}
|
|
234
|
-
//#endregion
|
|
235
234
|
exports.makeLike = makeLike;
|
|
236
235
|
exports.mapToDb = mapToDb;
|
|
237
236
|
exports.parseEntityFilter = parseEntityFilter;
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityMetadata } from "../EntityMetadata.cjs";
|
|
2
2
|
import { ValueFilter } from "./find/EntityFilter.cjs";
|
|
3
|
+
import { ParsedValueFilter } from "./parsedConditions.cjs";
|
|
3
4
|
import { Column } from "../serde/columns.cjs";
|
|
4
|
-
import { EntityMetadata } from "../EntityMetadata.cjs";
|
|
5
|
-
//#region src/queries/valueFilters.d.ts
|
|
6
5
|
/** An ADT version of `EntityFilter`. */
|
|
7
|
-
type ParsedEntityFilter = ParsedValueFilter<string | number> | {
|
|
6
|
+
export type ParsedEntityFilter = ParsedValueFilter<string | number> | {
|
|
8
7
|
kind: "join";
|
|
9
8
|
subFilter: object;
|
|
10
9
|
};
|
|
11
10
|
/** Parses an entity filter, which could be "just an id", an array of ids, or a nested filter. */
|
|
12
|
-
declare function parseEntityFilter(_meta: EntityMetadata, filter: any): ParsedEntityFilter | undefined;
|
|
11
|
+
export declare function parseEntityFilter(_meta: EntityMetadata, filter: any): ParsedEntityFilter | undefined;
|
|
13
12
|
/**
|
|
14
13
|
* Parses the many/hodgepodge (ergonomic!) patterns of value filters into a `ParsedValueFilter[]`.
|
|
15
14
|
*
|
|
16
15
|
* Note we return an array because filter might be a `ValueGraphQLFilter` that is allowed to have
|
|
17
16
|
* multiple conditions, i.e. `{ lt: 10, gt: 5 }`.
|
|
18
17
|
*/
|
|
19
|
-
declare function parseValueFilter<V>(filter: ValueFilter<V, any>): ParsedValueFilter<V>[];
|
|
18
|
+
export declare function parseValueFilter<V>(filter: ValueFilter<V, any>): ParsedValueFilter<V>[];
|
|
20
19
|
/** Converts domain-level values like string ids/enums into their db equivalent. */
|
|
21
|
-
declare function mapToDb(column: Column, filter: ParsedValueFilter<any>): ParsedValueFilter<any>;
|
|
20
|
+
export declare function mapToDb(column: Column, filter: ParsedValueFilter<any>): ParsedValueFilter<any>;
|
|
22
21
|
/** Converts a search term like `foo bar` into a SQL `like` pattern like `%foo%bar%`. */
|
|
23
|
-
declare function makeLike(search: any | undefined): any;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { ParsedEntityFilter, makeLike, mapToDb, parseEntityFilter, parseValueFilter };
|
|
22
|
+
export declare function makeLike(search: any | undefined): any;
|
|
26
23
|
//# sourceMappingURL=valueFilters.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueFilters.d.cts","names":[],"sources":["../../src/queries/valueFilters.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"valueFilters.d.cts","names":[],"sources":["../../src/queries/valueFilters.ts"],"mappings":";;;;;YAYY,qBAER;EAEE;EAAc;;;wBAGJ,kBAAkB,OAAO,gBAAgB,cAAc;;;;;;;wBA0FvD,iBAAiB,GAAG,QAAQ,YAAY,UAAU,kBAAkB;;wBAqFpE,QAAQ,QAAQ,QAAQ,QAAQ,yBAAyB;;wBAoEzD,SAAS"}
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityMetadata } from "../EntityMetadata.mjs";
|
|
2
2
|
import { ValueFilter } from "./find/EntityFilter.mjs";
|
|
3
|
+
import { ParsedValueFilter } from "./parsedConditions.mjs";
|
|
3
4
|
import { Column } from "../serde/columns.mjs";
|
|
4
|
-
import { EntityMetadata } from "../EntityMetadata.mjs";
|
|
5
|
-
//#region src/queries/valueFilters.d.ts
|
|
6
5
|
/** An ADT version of `EntityFilter`. */
|
|
7
|
-
type ParsedEntityFilter = ParsedValueFilter<string | number> | {
|
|
6
|
+
export type ParsedEntityFilter = ParsedValueFilter<string | number> | {
|
|
8
7
|
kind: "join";
|
|
9
8
|
subFilter: object;
|
|
10
9
|
};
|
|
11
10
|
/** Parses an entity filter, which could be "just an id", an array of ids, or a nested filter. */
|
|
12
|
-
declare function parseEntityFilter(_meta: EntityMetadata, filter: any): ParsedEntityFilter | undefined;
|
|
11
|
+
export declare function parseEntityFilter(_meta: EntityMetadata, filter: any): ParsedEntityFilter | undefined;
|
|
13
12
|
/**
|
|
14
13
|
* Parses the many/hodgepodge (ergonomic!) patterns of value filters into a `ParsedValueFilter[]`.
|
|
15
14
|
*
|
|
16
15
|
* Note we return an array because filter might be a `ValueGraphQLFilter` that is allowed to have
|
|
17
16
|
* multiple conditions, i.e. `{ lt: 10, gt: 5 }`.
|
|
18
17
|
*/
|
|
19
|
-
declare function parseValueFilter<V>(filter: ValueFilter<V, any>): ParsedValueFilter<V>[];
|
|
18
|
+
export declare function parseValueFilter<V>(filter: ValueFilter<V, any>): ParsedValueFilter<V>[];
|
|
20
19
|
/** Converts domain-level values like string ids/enums into their db equivalent. */
|
|
21
|
-
declare function mapToDb(column: Column, filter: ParsedValueFilter<any>): ParsedValueFilter<any>;
|
|
20
|
+
export declare function mapToDb(column: Column, filter: ParsedValueFilter<any>): ParsedValueFilter<any>;
|
|
22
21
|
/** Converts a search term like `foo bar` into a SQL `like` pattern like `%foo%bar%`. */
|
|
23
|
-
declare function makeLike(search: any | undefined): any;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { ParsedEntityFilter, makeLike, mapToDb, parseEntityFilter, parseValueFilter };
|
|
22
|
+
export declare function makeLike(search: any | undefined): any;
|
|
26
23
|
//# sourceMappingURL=valueFilters.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valueFilters.d.mts","names":[],"sources":["../../src/queries/valueFilters.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"valueFilters.d.mts","names":[],"sources":["../../src/queries/valueFilters.ts"],"mappings":";;;;;YAYY,qBAER;EAEE;EAAc;;;wBAGJ,kBAAkB,OAAO,gBAAgB,cAAc;;;;;;;wBA0FvD,iBAAiB,GAAG,QAAQ,YAAY,UAAU,kBAAkB;;wBAqFpE,QAAQ,QAAQ,QAAQ,QAAQ,yBAAyB;;wBAoEzD,SAAS"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { isEntity } from "../Entity.js";
|
|
2
|
+
import { isDefined } from "../EntityManager.js";
|
|
1
3
|
import { isAlias } from "./find/Aliases.js";
|
|
2
4
|
import { isScope } from "./find/scopes.js";
|
|
3
5
|
import { assertNever } from "../utils.js";
|
|
4
|
-
import { isDefined } from "../EntityManager.js";
|
|
5
|
-
import { isEntity } from "../Entity.js";
|
|
6
6
|
import { isPlainObject } from "joist-utils";
|
|
7
|
-
|
|
7
|
+
// src/queries/valueFilters.ts
|
|
8
8
|
/** Parses an entity filter, which could be "just an id", an array of ids, or a nested filter. */
|
|
9
9
|
function parseEntityFilter(_meta, filter) {
|
|
10
10
|
if (filter === void 0) return;
|
|
@@ -230,7 +230,6 @@ function shouldPruneValueFilter(key, value) {
|
|
|
230
230
|
function isNotInDb(value) {
|
|
231
231
|
return value.idTaggedMaybe === void 0;
|
|
232
232
|
}
|
|
233
|
-
//#endregion
|
|
234
233
|
export { makeLike, mapToDb, parseEntityFilter, parseValueFilter };
|
|
235
234
|
|
|
236
235
|
//# sourceMappingURL=valueFilters.js.map
|
|
@@ -1,21 +1,39 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
2
|
+
const require_EntityManager = require("../EntityManager.cjs");
|
|
3
3
|
const require_EntityMetadata = require("../EntityMetadata.cjs");
|
|
4
|
-
const require_trusted = require("../trusted.cjs");
|
|
5
|
-
const require_logging_ReactionLogger = require("../logging/ReactionLogger.cjs");
|
|
6
4
|
const require_index = require("../index.cjs");
|
|
7
|
-
const
|
|
8
|
-
|
|
5
|
+
const require_logging_ReactionLogger = require("../logging/ReactionLogger.cjs");
|
|
6
|
+
const require_reactivity_reactiveHints = require("./reactiveHints.cjs");
|
|
7
|
+
const require_rules = require("../rules.cjs");
|
|
8
|
+
const require_transitions = require("../transitions.cjs");
|
|
9
|
+
const require_trusted = require("../trusted.cjs");
|
|
10
|
+
const require_utils = require("../utils.cjs");
|
|
11
|
+
// src/reactivity/ReactionsManager.ts
|
|
9
12
|
/**
|
|
10
13
|
* Manages the reactivity of tracking which source fields have changed and finding/recalculating
|
|
11
14
|
* their downstream derived fields.
|
|
12
15
|
*
|
|
13
16
|
* Source fields are usually regular/dumb primitives, i.e. `Author.age` is a source field
|
|
14
17
|
* of `Book.isPublic`, but derived fields can themselves be source fields as well.
|
|
18
|
+
* Guarded state transitions share this loop; their commit callbacks wait until SQL has been flushed.
|
|
15
19
|
*/
|
|
16
20
|
var ReactionsManager = class {
|
|
17
21
|
/** Stores all source `Reactables`s that have been marked for later traversal. */
|
|
18
22
|
pendingReactables = /* @__PURE__ */ new Map();
|
|
23
|
+
/** Queued state changes, including changes made by callbacks, are processed in reaction passes. */
|
|
24
|
+
pendingTransitions = [];
|
|
25
|
+
/**
|
|
26
|
+
* Initial assignments are collapsed until reactions first see the entity.
|
|
27
|
+
*
|
|
28
|
+
* Each entity keeps one creation step per transition field. Each step is also in `pendingTransitions`, and
|
|
29
|
+
* later assignments update its `to` in place. An entity usually has one or two transition fields, so a
|
|
30
|
+
* short array is cheaper than a nested Map.
|
|
31
|
+
*/
|
|
32
|
+
transitionCreations = /* @__PURE__ */ new Map();
|
|
33
|
+
/** New entities that reactions have seen, so their assignments are transitions. */
|
|
34
|
+
postCreationWindowEntities = /* @__PURE__ */ new Set();
|
|
35
|
+
/** Only matching callbacks are retained until SQL and final validation finish. */
|
|
36
|
+
pendingCommitTransitions = [];
|
|
19
37
|
/** Failed actions to retry post-hooks, deduped by target field name -> entity (rare error path). */
|
|
20
38
|
actionsPendingTypeErrors = /* @__PURE__ */ new Map();
|
|
21
39
|
/**
|
|
@@ -50,6 +68,76 @@ var ReactionsManager = class {
|
|
|
50
68
|
this.em = em;
|
|
51
69
|
}
|
|
52
70
|
/**
|
|
71
|
+
* Called by `setField` before changing an enum field, to check and queue the transition.
|
|
72
|
+
*
|
|
73
|
+
* An entity has no previous state until Joist's reactions have seen it, so every assignment to a new
|
|
74
|
+
* entity until then is part of its creation. I.e. `em.create` then `entity.status = Open`, or a factory
|
|
75
|
+
* setting a default and then a `withStatus` value, or `em.findOrCreate` creating then upserting, all
|
|
76
|
+
* create the entity as `Open`. Creation isn't checked against the `transitions` table.
|
|
77
|
+
*/
|
|
78
|
+
queueTransition(entity, fieldName, from, to) {
|
|
79
|
+
const meta = require_EntityMetadata.getMetadata(entity);
|
|
80
|
+
const transitions = meta.transitions.get(fieldName);
|
|
81
|
+
if (!transitions) return;
|
|
82
|
+
if (entity.isNewEntity && !this.postCreationWindowEntities.has(entity)) {
|
|
83
|
+
let creations = this.transitionCreations.get(entity);
|
|
84
|
+
if (!creations) this.transitionCreations.set(entity, creations = []);
|
|
85
|
+
const existing = creations.find((pending) => pending.fieldName === fieldName);
|
|
86
|
+
if (existing) existing.step.to = to;
|
|
87
|
+
else {
|
|
88
|
+
const pending = {
|
|
89
|
+
entity,
|
|
90
|
+
fieldName,
|
|
91
|
+
step: {
|
|
92
|
+
from: require_transitions.created,
|
|
93
|
+
to
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
creations.push(pending);
|
|
97
|
+
this.pendingTransitions.push(pending);
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
for (const table of transitions.tables) {
|
|
101
|
+
if (table.get(from)?.includes(to)) continue;
|
|
102
|
+
const message = `Cannot change ${fieldName} from ${require_transitions.describeValue(meta, fieldName, from)} to ${require_transitions.describeValue(meta, fieldName, to)}`;
|
|
103
|
+
throw new require_rules.ValidationErrors([{
|
|
104
|
+
entity,
|
|
105
|
+
message
|
|
106
|
+
}]);
|
|
107
|
+
}
|
|
108
|
+
this.pendingTransitions.push({
|
|
109
|
+
entity,
|
|
110
|
+
fieldName,
|
|
111
|
+
step: {
|
|
112
|
+
from,
|
|
113
|
+
to
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/** Forgets a field's creation transition after a factory assigns its trusted initial value. */
|
|
119
|
+
forgetCreationTransition(entity, fieldName) {
|
|
120
|
+
const creations = this.transitionCreations.get(entity);
|
|
121
|
+
const i = creations?.findIndex((pending) => pending.fieldName === fieldName) ?? -1;
|
|
122
|
+
if (i === -1) return;
|
|
123
|
+
const [pending] = creations.splice(i, 1);
|
|
124
|
+
this.pendingTransitions.splice(this.pendingTransitions.lastIndexOf(pending), 1);
|
|
125
|
+
}
|
|
126
|
+
/** Returns whether callbacks need a commit phase, even if there are no net SQL changes. */
|
|
127
|
+
hasPendingCommitTransitions() {
|
|
128
|
+
return this.pendingCommitTransitions.some((pending) => !pending.entity.isDeletedEntity);
|
|
129
|
+
}
|
|
130
|
+
/** Runs the queued callbacks after all SQL and validation succeed, without rechecking guards. */
|
|
131
|
+
async runCommitTransitions() {
|
|
132
|
+
const batch = this.pendingCommitTransitions.splice(0);
|
|
133
|
+
for (const wave of groupIntoEntityWaves(batch)) {
|
|
134
|
+
const results = await Promise.allSettled(wave.map(async (pending) => {
|
|
135
|
+
if (!pending.entity.isDeletedEntity) await pending.callback.run(pending.entity, this.em.ctx, pending.step, pending.callback.evaluation);
|
|
136
|
+
}));
|
|
137
|
+
require_utils.failIfAnyRejected(results);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
53
141
|
* Queue all downstream reactive fields that depend on `fieldName` as a source field.
|
|
54
142
|
*
|
|
55
143
|
* This method can be synchronous b/c we internally queue the `Reactable` reverse
|
|
@@ -58,6 +146,7 @@ var ReactionsManager = class {
|
|
|
58
146
|
*/
|
|
59
147
|
queueDownstreamReactables(entity, fieldName) {
|
|
60
148
|
for (const r of this.getReactablesByField(entity, fieldName)) {
|
|
149
|
+
if (r.kind === "cache") continue;
|
|
61
150
|
this.getPending(r).todo.add(entity);
|
|
62
151
|
this.#needsRecalc[r.kind] = true;
|
|
63
152
|
this.logger.logQueued(entity, fieldName, r);
|
|
@@ -66,6 +155,7 @@ var ReactionsManager = class {
|
|
|
66
155
|
/** Dequeues reactivity on `fieldName`, i.e. if it's no longer dirty. */
|
|
67
156
|
dequeueDownstreamReactables(entity, fieldName) {
|
|
68
157
|
for (const r of this.getReactablesByField(entity, fieldName)) {
|
|
158
|
+
if (r.kind === "cache") continue;
|
|
69
159
|
const pending = this.getPending(r);
|
|
70
160
|
if (pending.done.has(entity)) {
|
|
71
161
|
pending.todo.add(entity);
|
|
@@ -76,6 +166,7 @@ var ReactionsManager = class {
|
|
|
76
166
|
/** Queue all downstream reactive fields that depend on this entity being created or deleted. */
|
|
77
167
|
queueAllDownstreamFields(entity, reason) {
|
|
78
168
|
for (const r of this.getReactables(entity)) {
|
|
169
|
+
if (r.kind === "cache") continue;
|
|
79
170
|
this.getPending(r).todo.add(entity);
|
|
80
171
|
this.#needsRecalc[r.kind] = true;
|
|
81
172
|
this.logger.logQueuedAll(entity, reason, r);
|
|
@@ -110,6 +201,7 @@ var ReactionsManager = class {
|
|
|
110
201
|
if (this.needsRecalc(kind)) this.logger.logStartingRecalc(this.em, kind);
|
|
111
202
|
let loops = 0;
|
|
112
203
|
while (this.needsRecalc(kind)) {
|
|
204
|
+
this.endTransitionCreations();
|
|
113
205
|
if (kind === "reactables") {
|
|
114
206
|
this.#needsRecalc.populate = false;
|
|
115
207
|
this.#needsRecalc.reaction = false;
|
|
@@ -172,6 +264,7 @@ var ReactionsManager = class {
|
|
|
172
264
|
});
|
|
173
265
|
}
|
|
174
266
|
if (failures.length > 0) throw failures[0];
|
|
267
|
+
if (kind === "reactables") await require_trusted.runInTrustedContext(() => this.processPendingTransitions());
|
|
175
268
|
for (const action of actions) if (action.r.runOnce) {
|
|
176
269
|
let set = this.processedActions.get(action.r.name);
|
|
177
270
|
if (!set) this.processedActions.set(action.r.name, set = /* @__PURE__ */ new Set());
|
|
@@ -200,10 +293,19 @@ var ReactionsManager = class {
|
|
|
200
293
|
get hasPendingTypeErrors() {
|
|
201
294
|
return this.actionsPendingTypeErrors.size > 0;
|
|
202
295
|
}
|
|
203
|
-
/** Clears
|
|
296
|
+
/** Clears pending reaction and transition work after a successful flush, including flushes with no SQL. */
|
|
204
297
|
clear() {
|
|
205
298
|
this.pendingReactables = /* @__PURE__ */ new Map();
|
|
206
299
|
this.processedActions.clear();
|
|
300
|
+
this.pendingTransitions.length = 0;
|
|
301
|
+
this.transitionCreations.clear();
|
|
302
|
+
this.postCreationWindowEntities.clear();
|
|
303
|
+
this.pendingCommitTransitions.length = 0;
|
|
304
|
+
this.#needsRecalc = {
|
|
305
|
+
populate: false,
|
|
306
|
+
query: false,
|
|
307
|
+
reaction: false
|
|
308
|
+
};
|
|
207
309
|
}
|
|
208
310
|
setLogger(logger) {
|
|
209
311
|
this.logger = logger ?? require_logging_ReactionLogger.noopReactionLogger;
|
|
@@ -225,7 +327,63 @@ var ReactionsManager = class {
|
|
|
225
327
|
byEntity.set(action.entity, action);
|
|
226
328
|
}
|
|
227
329
|
needsRecalc(kind) {
|
|
228
|
-
return kind === "reactables" ? this.#needsRecalc.populate || this.#needsRecalc.reaction : this.#needsRecalc.query;
|
|
330
|
+
return kind === "reactables" ? this.#needsRecalc.populate || this.#needsRecalc.reaction || this.pendingTransitions.length > 0 : this.#needsRecalc.query;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Ends the creation of every new entity so far, before each loop of reactions.
|
|
334
|
+
*
|
|
335
|
+
* After this, assignments to those entities are transitions, i.e. an Approval created as `Requested`
|
|
336
|
+
* that a reaction then auto-approves records `Requested -> Approved`.
|
|
337
|
+
*/
|
|
338
|
+
endTransitionCreations() {
|
|
339
|
+
for (const entity of this.transitionCreations.keys()) this.postCreationWindowEntities.add(entity);
|
|
340
|
+
this.transitionCreations.clear();
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Evaluates each pending transition's guards once, then dispatches its matching callbacks.
|
|
344
|
+
*
|
|
345
|
+
* I.e. Pending -> Signed -> Pending restores an advance's original status, but the Signed guard must still run.
|
|
346
|
+
* Callbacks can append more transitions; taking one batch leaves those for the next reaction pass.
|
|
347
|
+
* Each wave processes one step per entity, so populate requests batch across entities without
|
|
348
|
+
* allowing an entity's next transition to overtake its previous callbacks.
|
|
349
|
+
*
|
|
350
|
+
* We might eventually treat A -> B -> A as an undo and ignore both transitions before reactions
|
|
351
|
+
* have seen them. For now, each transition is meaningful, even when the final state is unchanged.
|
|
352
|
+
*/
|
|
353
|
+
async processPendingTransitions() {
|
|
354
|
+
this.endTransitionCreations();
|
|
355
|
+
if (this.pendingTransitions.length === 0) return;
|
|
356
|
+
const batch = this.pendingTransitions.splice(0);
|
|
357
|
+
for (const wave of groupIntoEntityWaves(batch)) {
|
|
358
|
+
const guardResults = await Promise.allSettled(wave.map((pending) => this.evaluateTransitionGuards(pending)));
|
|
359
|
+
const errors = require_utils.failIfAnyRejected(guardResults).flat();
|
|
360
|
+
if (errors.length > 0) throw new require_rules.ValidationErrors(errors);
|
|
361
|
+
const callbackResults = await Promise.allSettled(wave.map((pending) => this.runTransitionCallbacks(pending)));
|
|
362
|
+
require_utils.failIfAnyRejected(callbackResults);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
/** Evaluates one transition's matching guards before any callbacks in its wave run. */
|
|
366
|
+
async evaluateTransitionGuards(pending) {
|
|
367
|
+
const { entity, fieldName, step } = pending;
|
|
368
|
+
if (entity.isDeletedEntity || step.from === require_transitions.created) return [];
|
|
369
|
+
const guards = require_EntityMetadata.getMetadata(entity).transitions.get(fieldName).guards.filter((guard) => require_transitions.matchesTransition(guard.matcher, step));
|
|
370
|
+
const results = await Promise.allSettled(guards.map((guard) => require_EntityManager.invokeRule(entity, () => guard.run(entity, step))));
|
|
371
|
+
return require_utils.failIfAnyRejected(results).flat();
|
|
372
|
+
}
|
|
373
|
+
/** Runs one entity's callbacks in registration order after all guards in the wave have passed. */
|
|
374
|
+
async runTransitionCallbacks(pending) {
|
|
375
|
+
const { entity, fieldName, step } = pending;
|
|
376
|
+
if (entity.isDeletedEntity) return;
|
|
377
|
+
for (const callback of require_EntityMetadata.getMetadata(entity).transitions.get(fieldName).callbacks) {
|
|
378
|
+
if (entity.isDeletedEntity) break;
|
|
379
|
+
if (!require_transitions.matchesTransition(callback.matcher, step)) continue;
|
|
380
|
+
if (callback.phase === "commit") this.pendingCommitTransitions.push({
|
|
381
|
+
entity,
|
|
382
|
+
callback,
|
|
383
|
+
step
|
|
384
|
+
});
|
|
385
|
+
else await callback.run(entity, this.em.ctx, step, callback.evaluation);
|
|
386
|
+
}
|
|
229
387
|
}
|
|
230
388
|
getPending(r) {
|
|
231
389
|
let pending = this.pendingReactables.get(r);
|
|
@@ -256,9 +414,19 @@ var ReactionsManager = class {
|
|
|
256
414
|
return (require_EntityManager.getEmInternalApi(this.em).isMerging(entity) ? meta.reactablesIncludingReadOnlyByField : meta.reactablesByField).get(fieldName) ?? noReactables;
|
|
257
415
|
}
|
|
258
416
|
};
|
|
417
|
+
/** Groups queued work into parallel waves while preserving each entity's input order. */
|
|
418
|
+
function groupIntoEntityWaves(batch) {
|
|
419
|
+
const waves = [];
|
|
420
|
+
const waveByEntity = /* @__PURE__ */ new Map();
|
|
421
|
+
for (const pending of batch) {
|
|
422
|
+
const wave = waveByEntity.get(pending.entity) ?? 0;
|
|
423
|
+
(waves[wave] ??= []).push(pending);
|
|
424
|
+
waveByEntity.set(pending.entity, wave + 1);
|
|
425
|
+
}
|
|
426
|
+
return waves;
|
|
427
|
+
}
|
|
259
428
|
/** A shared frozen array for fields with no downstream reactables. */
|
|
260
429
|
const noReactables = Object.freeze([]);
|
|
261
|
-
//#endregion
|
|
262
430
|
exports.ReactionsManager = ReactionsManager;
|
|
263
431
|
|
|
264
432
|
//# sourceMappingURL=ReactionsManager.cjs.map
|