joist-core 2.4.0-next.37 → 2.4.0-next.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/BaseEntity.d.cts +3 -4
- package/build/BaseEntity.d.cts.map +1 -1
- package/build/BaseEntity.d.mts +3 -4
- package/build/BaseEntity.d.mts.map +1 -1
- package/build/Entity.d.cts +3 -4
- package/build/Entity.d.cts.map +1 -1
- package/build/Entity.d.mts +3 -4
- package/build/Entity.d.mts.map +1 -1
- package/build/EntityFields.d.cts +3 -4
- package/build/EntityFields.d.cts.map +1 -1
- package/build/EntityFields.d.mts +3 -4
- package/build/EntityFields.d.mts.map +1 -1
- package/build/EntityManager.cjs +11 -3
- package/build/EntityManager.cjs.map +1 -1
- package/build/EntityManager.d.cts +47 -41
- package/build/EntityManager.d.cts.map +1 -1
- package/build/EntityManager.d.mts +47 -41
- package/build/EntityManager.d.mts.map +1 -1
- package/build/EntityManager.js +11 -3
- package/build/EntityManager.js.map +1 -1
- package/build/EntityMetadata.d.cts +31 -32
- package/build/EntityMetadata.d.cts.map +1 -1
- package/build/EntityMetadata.d.mts +31 -32
- package/build/EntityMetadata.d.mts.map +1 -1
- package/build/EnumMetadata.d.cts +1 -2
- package/build/EnumMetadata.d.cts.map +1 -1
- package/build/EnumMetadata.d.mts +1 -2
- package/build/EnumMetadata.d.mts.map +1 -1
- package/build/IndexManager.cjs.map +1 -1
- package/build/IndexManager.d.cts +2 -3
- package/build/IndexManager.d.cts.map +1 -1
- package/build/IndexManager.d.mts +2 -3
- package/build/IndexManager.d.mts.map +1 -1
- package/build/IndexManager.js.map +1 -1
- package/build/InstanceData.cjs.map +1 -1
- package/build/InstanceData.d.cts +1 -2
- package/build/InstanceData.d.cts.map +1 -1
- package/build/InstanceData.d.mts +1 -2
- package/build/InstanceData.d.mts.map +1 -1
- package/build/InstanceData.js.map +1 -1
- package/build/PluginManager.cjs.map +1 -1
- package/build/PluginManager.d.cts +4 -4
- package/build/PluginManager.d.cts.map +1 -1
- package/build/PluginManager.d.mts +4 -4
- package/build/PluginManager.d.mts.map +1 -1
- package/build/PluginManager.js.map +1 -1
- package/build/RowData.d.cts +3 -4
- package/build/RowData.d.cts.map +1 -1
- package/build/RowData.d.mts +3 -4
- package/build/RowData.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.cjs.map +1 -1
- package/build/batchloaders/BatchLoader.d.cts +1 -2
- package/build/batchloaders/BatchLoader.d.cts.map +1 -1
- package/build/batchloaders/BatchLoader.d.mts +1 -2
- package/build/batchloaders/BatchLoader.d.mts.map +1 -1
- package/build/batchloaders/BatchLoader.js.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.cts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/enumCollectionBatchLoader.d.mts +2 -3
- package/build/batchloaders/enumCollectionBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.cts +2 -3
- package/build/batchloaders/loadBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/loadBatchLoader.d.mts +2 -3
- package/build/batchloaders/loadBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/manyToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/manyToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToManyBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToManyBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.cts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/oneToOneBatchLoader.d.mts +2 -3
- package/build/batchloaders/oneToOneBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.cts +2 -3
- package/build/batchloaders/populateBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/populateBatchLoader.d.mts +2 -3
- package/build/batchloaders/populateBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveChildrenBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveM2mBatchLoader.d.mts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.cts.map +1 -1
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts +2 -3
- package/build/batchloaders/recursiveParentsBatchLoader.d.mts.map +1 -1
- package/build/changes.cjs.map +1 -1
- package/build/changes.d.cts +9 -10
- package/build/changes.d.cts.map +1 -1
- package/build/changes.d.mts +9 -10
- package/build/changes.d.mts.map +1 -1
- package/build/changes.js.map +1 -1
- package/build/config.d.cts +17 -17
- package/build/config.d.cts.map +1 -1
- package/build/config.d.mts +17 -17
- package/build/config.d.mts.map +1 -1
- package/build/configure.d.cts +8 -9
- package/build/configure.d.cts.map +1 -1
- package/build/configure.d.mts +8 -9
- package/build/configure.d.mts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.cts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.cts.map +1 -1
- package/build/dataloaders/fastWhereFilterHash.d.mts +1 -2
- package/build/dataloaders/fastWhereFilterHash.d.mts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.cts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findByUniqueDataLoader.d.mts +2 -3
- package/build/dataloaders/findByUniqueDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.cts +4 -5
- package/build/dataloaders/findCountDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findCountDataLoader.d.mts +4 -5
- package/build/dataloaders/findCountDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findDataLoader.d.cts +11 -12
- package/build/dataloaders/findDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findDataLoader.d.mts +11 -12
- package/build/dataloaders/findDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.cts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findIdsDataLoader.d.mts +2 -3
- package/build/dataloaders/findIdsDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.cts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findOrCreateDataLoader.d.mts +3 -3
- package/build/dataloaders/findOrCreateDataLoader.d.mts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.cts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.cts.map +1 -1
- package/build/dataloaders/findPaginatedDataLoader.d.mts +1 -2
- package/build/dataloaders/findPaginatedDataLoader.d.mts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.cts +2 -3
- package/build/dataloaders/lensDataLoader.d.cts.map +1 -1
- package/build/dataloaders/lensDataLoader.d.mts +2 -3
- package/build/dataloaders/lensDataLoader.d.mts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/manyToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/manyToManyFindDataLoader.d.mts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.cts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.cts.map +1 -1
- package/build/dataloaders/oneToManyFindDataLoader.d.mts +2 -3
- package/build/dataloaders/oneToManyFindDataLoader.d.mts.map +1 -1
- package/build/defaults.cjs.map +1 -1
- package/build/defaults.d.cts +7 -7
- package/build/defaults.d.cts.map +1 -1
- package/build/defaults.d.mts +7 -7
- package/build/defaults.d.mts.map +1 -1
- package/build/defaults.js.map +1 -1
- package/build/drivers/Driver.d.cts +2 -3
- package/build/drivers/Driver.d.cts.map +1 -1
- package/build/drivers/Driver.d.mts +2 -3
- package/build/drivers/Driver.d.mts.map +1 -1
- package/build/drivers/EntityWriter.d.cts +7 -7
- package/build/drivers/EntityWriter.d.cts.map +1 -1
- package/build/drivers/EntityWriter.d.mts +7 -7
- package/build/drivers/EntityWriter.d.mts.map +1 -1
- package/build/drivers/IdAssigner.cjs.map +1 -1
- package/build/drivers/IdAssigner.d.cts +5 -5
- package/build/drivers/IdAssigner.d.cts.map +1 -1
- package/build/drivers/IdAssigner.d.mts +5 -5
- package/build/drivers/IdAssigner.d.mts.map +1 -1
- package/build/drivers/IdAssigner.js.map +1 -1
- package/build/drivers/driverApi.d.cts +2 -3
- package/build/drivers/driverApi.d.cts.map +1 -1
- package/build/drivers/driverApi.d.mts +2 -3
- package/build/drivers/driverApi.d.mts.map +1 -1
- package/build/fields.d.cts +6 -7
- package/build/fields.d.cts.map +1 -1
- package/build/fields.d.mts +6 -7
- package/build/fields.d.mts.map +1 -1
- package/build/flush/FlushLock.cjs.map +1 -1
- package/build/flush/FlushLock.d.cts +1 -2
- package/build/flush/FlushLock.d.cts.map +1 -1
- package/build/flush/FlushLock.d.mts +1 -2
- package/build/flush/FlushLock.d.mts.map +1 -1
- package/build/flush/FlushLock.js.map +1 -1
- package/build/flush/JoinRows.cjs.map +1 -1
- package/build/flush/JoinRows.d.cts +5 -6
- package/build/flush/JoinRows.d.cts.map +1 -1
- package/build/flush/JoinRows.d.mts +5 -6
- package/build/flush/JoinRows.d.mts.map +1 -1
- package/build/flush/JoinRows.js.map +1 -1
- package/build/flush/PendingChanges.d.cts +5 -6
- package/build/flush/PendingChanges.d.cts.map +1 -1
- package/build/flush/PendingChanges.d.mts +5 -6
- package/build/flush/PendingChanges.d.mts.map +1 -1
- package/build/flush/Todo.d.cts +5 -6
- package/build/flush/Todo.d.cts.map +1 -1
- package/build/flush/Todo.d.mts +5 -6
- package/build/flush/Todo.d.mts.map +1 -1
- package/build/getProperties.d.cts +3 -4
- package/build/getProperties.d.cts.map +1 -1
- package/build/getProperties.d.mts +3 -4
- package/build/getProperties.d.mts.map +1 -1
- package/build/index.d.cts +17 -17
- package/build/index.d.cts.map +1 -1
- package/build/index.d.mts +17 -17
- package/build/index.d.mts.map +1 -1
- package/build/json.d.cts +11 -11
- package/build/json.d.cts.map +1 -1
- package/build/json.d.mts +11 -11
- package/build/json.d.mts.map +1 -1
- package/build/keys.d.cts +27 -27
- package/build/keys.d.cts.map +1 -1
- package/build/keys.d.mts +27 -27
- package/build/keys.d.mts.map +1 -1
- package/build/loading/HintTree.d.cts +3 -4
- package/build/loading/HintTree.d.cts.map +1 -1
- package/build/loading/HintTree.d.mts +3 -4
- package/build/loading/HintTree.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.cjs.map +1 -1
- package/build/loading/IsLoadedCache.d.cts +2 -3
- package/build/loading/IsLoadedCache.d.cts.map +1 -1
- package/build/loading/IsLoadedCache.d.mts +2 -3
- package/build/loading/IsLoadedCache.d.mts.map +1 -1
- package/build/loading/IsLoadedCache.js.map +1 -1
- package/build/loading/loadHints.d.cts +17 -17
- package/build/loading/loadHints.d.cts.map +1 -1
- package/build/loading/loadHints.d.mts +17 -17
- package/build/loading/loadHints.d.mts.map +1 -1
- package/build/loading/loadLens.d.cts +13 -13
- package/build/loading/loadLens.d.cts.map +1 -1
- package/build/loading/loadLens.d.mts +13 -13
- package/build/loading/loadLens.d.mts.map +1 -1
- package/build/loading/withLoaded.d.cts +5 -6
- package/build/loading/withLoaded.d.cts.map +1 -1
- package/build/loading/withLoaded.d.mts +5 -6
- package/build/loading/withLoaded.d.mts.map +1 -1
- package/build/logging/FactoryLogger.d.cts +3 -4
- package/build/logging/FactoryLogger.d.cts.map +1 -1
- package/build/logging/FactoryLogger.d.mts +3 -4
- package/build/logging/FactoryLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.cjs.map +1 -1
- package/build/logging/FieldLogger.d.cts +4 -5
- package/build/logging/FieldLogger.d.cts.map +1 -1
- package/build/logging/FieldLogger.d.mts +4 -5
- package/build/logging/FieldLogger.d.mts.map +1 -1
- package/build/logging/FieldLogger.js.map +1 -1
- package/build/logging/ReactionLogger.d.cts +7 -7
- package/build/logging/ReactionLogger.d.cts.map +1 -1
- package/build/logging/ReactionLogger.d.mts +7 -7
- package/build/logging/ReactionLogger.d.mts.map +1 -1
- package/build/newEntity.cjs.map +1 -1
- package/build/newEntity.d.cts +4 -5
- package/build/newEntity.d.cts.map +1 -1
- package/build/newEntity.d.mts +4 -5
- package/build/newEntity.d.mts.map +1 -1
- package/build/newEntity.js.map +1 -1
- package/build/newTestInstance.d.cts +21 -21
- package/build/newTestInstance.d.cts.map +1 -1
- package/build/newTestInstance.d.mts +21 -21
- package/build/newTestInstance.d.mts.map +1 -1
- package/build/normalizeHints.d.cts +7 -8
- package/build/normalizeHints.d.cts.map +1 -1
- package/build/normalizeHints.d.mts +7 -8
- package/build/normalizeHints.d.mts.map +1 -1
- package/build/nowUTC.d.cts +4 -5
- package/build/nowUTC.d.cts.map +1 -1
- package/build/nowUTC.d.mts +4 -5
- package/build/nowUTC.d.mts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.cts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.cts.map +1 -1
- package/build/plugins/ImmutableEntitiesPlugin.d.mts +1 -2
- package/build/plugins/ImmutableEntitiesPlugin.d.mts.map +1 -1
- package/build/plugins/PreloadPlugin.d.cts +3 -4
- package/build/plugins/PreloadPlugin.d.cts.map +1 -1
- package/build/plugins/PreloadPlugin.d.mts +3 -4
- package/build/plugins/PreloadPlugin.d.mts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.cts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.cts.map +1 -1
- package/build/preloading/JsonAggregatePreloader.d.mts +1 -2
- package/build/preloading/JsonAggregatePreloader.d.mts.map +1 -1
- package/build/preloading/canPreload.d.cts +1 -2
- package/build/preloading/canPreload.d.cts.map +1 -1
- package/build/preloading/canPreload.d.mts +1 -2
- package/build/preloading/canPreload.d.mts.map +1 -1
- package/build/preloading/partitionHint.d.cts +1 -2
- package/build/preloading/partitionHint.d.cts.map +1 -1
- package/build/preloading/partitionHint.d.mts +1 -2
- package/build/preloading/partitionHint.d.mts.map +1 -1
- package/build/queries/ConditionBuilder.d.cts +2 -2
- package/build/queries/ConditionBuilder.d.cts.map +1 -1
- package/build/queries/ConditionBuilder.d.mts +2 -2
- package/build/queries/ConditionBuilder.d.mts.map +1 -1
- package/build/queries/conditions.d.cts +11 -12
- package/build/queries/conditions.d.cts.map +1 -1
- package/build/queries/conditions.d.mts +11 -12
- package/build/queries/conditions.d.mts.map +1 -1
- package/build/queries/entityQueryUtils.d.cts +4 -5
- package/build/queries/entityQueryUtils.d.cts.map +1 -1
- package/build/queries/entityQueryUtils.d.mts +4 -5
- package/build/queries/entityQueryUtils.d.mts.map +1 -1
- package/build/queries/find/Aliases.d.cts +16 -16
- package/build/queries/find/Aliases.d.cts.map +1 -1
- package/build/queries/find/Aliases.d.mts +16 -16
- package/build/queries/find/Aliases.d.mts.map +1 -1
- package/build/queries/find/DeferredAlias.d.cts +5 -6
- package/build/queries/find/DeferredAlias.d.cts.map +1 -1
- package/build/queries/find/DeferredAlias.d.mts +5 -6
- package/build/queries/find/DeferredAlias.d.mts.map +1 -1
- package/build/queries/find/EntityFilter.d.cts +12 -13
- package/build/queries/find/EntityFilter.d.cts.map +1 -1
- package/build/queries/find/EntityFilter.d.mts +12 -13
- package/build/queries/find/EntityFilter.d.mts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.cts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.cts.map +1 -1
- package/build/queries/find/EntityGraphQLFilter.d.mts +8 -9
- package/build/queries/find/EntityGraphQLFilter.d.mts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.cts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.cts.map +1 -1
- package/build/queries/find/QueryParser.collectionJoins.d.mts +1 -2
- package/build/queries/find/QueryParser.collectionJoins.d.mts.map +1 -1
- package/build/queries/find/QueryParser.d.cts +18 -18
- package/build/queries/find/QueryParser.d.cts.map +1 -1
- package/build/queries/find/QueryParser.d.mts +18 -18
- package/build/queries/find/QueryParser.d.mts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.cts +2 -3
- package/build/queries/find/QueryParser.pruning.d.cts.map +1 -1
- package/build/queries/find/QueryParser.pruning.d.mts +2 -3
- package/build/queries/find/QueryParser.pruning.d.mts.map +1 -1
- package/build/queries/find/QueryVisitor.d.cts +4 -4
- package/build/queries/find/QueryVisitor.d.cts.map +1 -1
- package/build/queries/find/QueryVisitor.d.mts +4 -4
- package/build/queries/find/QueryVisitor.d.mts.map +1 -1
- package/build/queries/find/buildFindQuery.d.cts +3 -3
- package/build/queries/find/buildFindQuery.d.cts.map +1 -1
- package/build/queries/find/buildFindQuery.d.mts +3 -3
- package/build/queries/find/buildFindQuery.d.mts.map +1 -1
- package/build/queries/find/scopes.cjs.map +1 -1
- package/build/queries/find/scopes.d.cts +12 -13
- package/build/queries/find/scopes.d.cts.map +1 -1
- package/build/queries/find/scopes.d.mts +12 -13
- package/build/queries/find/scopes.d.mts.map +1 -1
- package/build/queries/find/scopes.js.map +1 -1
- package/build/queries/parsedConditions.d.cts +7 -8
- package/build/queries/parsedConditions.d.cts.map +1 -1
- package/build/queries/parsedConditions.d.mts +7 -8
- package/build/queries/parsedConditions.d.mts.map +1 -1
- package/build/queries/renderConditions.d.cts +3 -4
- package/build/queries/renderConditions.d.cts.map +1 -1
- package/build/queries/renderConditions.d.mts +3 -4
- package/build/queries/renderConditions.d.mts.map +1 -1
- package/build/queries/skipCondition.d.cts +1 -2
- package/build/queries/skipCondition.d.cts.map +1 -1
- package/build/queries/skipCondition.d.mts +1 -2
- package/build/queries/skipCondition.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.cjs.map +1 -1
- package/build/queries/sql/AliasAssigner.d.cts +1 -2
- package/build/queries/sql/AliasAssigner.d.cts.map +1 -1
- package/build/queries/sql/AliasAssigner.d.mts +1 -2
- package/build/queries/sql/AliasAssigner.d.mts.map +1 -1
- package/build/queries/sql/AliasAssigner.js.map +1 -1
- package/build/queries/sql/Expr.d.cts +26 -27
- package/build/queries/sql/Expr.d.cts.map +1 -1
- package/build/queries/sql/Expr.d.mts +26 -27
- package/build/queries/sql/Expr.d.mts.map +1 -1
- package/build/queries/sql/JoinTree.d.cts +5 -5
- package/build/queries/sql/JoinTree.d.cts.map +1 -1
- package/build/queries/sql/JoinTree.d.mts +5 -5
- package/build/queries/sql/JoinTree.d.mts.map +1 -1
- package/build/queries/sql/Tables.d.cts +39 -39
- package/build/queries/sql/Tables.d.cts.map +1 -1
- package/build/queries/sql/Tables.d.mts +39 -39
- package/build/queries/sql/Tables.d.mts.map +1 -1
- package/build/queries/sql/custom.d.cts +14 -14
- package/build/queries/sql/custom.d.cts.map +1 -1
- package/build/queries/sql/custom.d.mts +14 -14
- package/build/queries/sql/custom.d.mts.map +1 -1
- package/build/queries/sql/execute.d.cts +15 -15
- package/build/queries/sql/execute.d.cts.map +1 -1
- package/build/queries/sql/execute.d.mts +15 -15
- package/build/queries/sql/execute.d.mts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.cts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.cts.map +1 -1
- package/build/queries/sql/expressions/arrayAgg.d.mts +5 -6
- package/build/queries/sql/expressions/arrayAgg.d.mts.map +1 -1
- package/build/queries/sql/expressions/case.d.cts +10 -10
- package/build/queries/sql/expressions/case.d.cts.map +1 -1
- package/build/queries/sql/expressions/case.d.mts +10 -10
- package/build/queries/sql/expressions/case.d.mts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.cts +5 -6
- package/build/queries/sql/expressions/coalesce.d.cts.map +1 -1
- package/build/queries/sql/expressions/coalesce.d.mts +5 -6
- package/build/queries/sql/expressions/coalesce.d.mts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.cts +1 -2
- package/build/queries/sql/expressions/codecs.d.cts.map +1 -1
- package/build/queries/sql/expressions/codecs.d.mts +1 -2
- package/build/queries/sql/expressions/codecs.d.mts.map +1 -1
- package/build/queries/sql/expressions/expression.d.cts +6 -6
- package/build/queries/sql/expressions/expression.d.cts.map +1 -1
- package/build/queries/sql/expressions/expression.d.mts +6 -6
- package/build/queries/sql/expressions/expression.d.mts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.cts +5 -6
- package/build/queries/sql/expressions/greatest.d.cts.map +1 -1
- package/build/queries/sql/expressions/greatest.d.mts +5 -6
- package/build/queries/sql/expressions/greatest.d.mts.map +1 -1
- package/build/queries/sql/expressions/least.d.cts +5 -6
- package/build/queries/sql/expressions/least.d.cts.map +1 -1
- package/build/queries/sql/expressions/least.d.mts +5 -6
- package/build/queries/sql/expressions/least.d.mts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.cts +5 -6
- package/build/queries/sql/expressions/nullIf.d.cts.map +1 -1
- package/build/queries/sql/expressions/nullIf.d.mts +5 -6
- package/build/queries/sql/expressions/nullIf.d.mts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.cts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.cts.map +1 -1
- package/build/queries/sql/expressions/parseExpression.d.mts +5 -6
- package/build/queries/sql/expressions/parseExpression.d.mts.map +1 -1
- package/build/queries/sql/expressions/types.d.cts +11 -11
- package/build/queries/sql/expressions/types.d.cts.map +1 -1
- package/build/queries/sql/expressions/types.d.mts +11 -11
- package/build/queries/sql/expressions/types.d.mts.map +1 -1
- package/build/queries/sql/keywords.d.cts +4 -5
- package/build/queries/sql/keywords.d.cts.map +1 -1
- package/build/queries/sql/keywords.d.mts +4 -5
- package/build/queries/sql/keywords.d.mts.map +1 -1
- package/build/queries/sql/query.cjs.map +1 -1
- package/build/queries/sql/query.d.cts +67 -67
- package/build/queries/sql/query.d.cts.map +1 -1
- package/build/queries/sql/query.d.mts +67 -67
- package/build/queries/sql/query.d.mts.map +1 -1
- package/build/queries/sql/query.js.map +1 -1
- package/build/queries/unnest.d.cts +2 -3
- package/build/queries/unnest.d.cts.map +1 -1
- package/build/queries/unnest.d.mts +2 -3
- package/build/queries/unnest.d.mts.map +1 -1
- package/build/queries/valueFilters.d.cts +5 -6
- package/build/queries/valueFilters.d.cts.map +1 -1
- package/build/queries/valueFilters.d.mts +5 -6
- package/build/queries/valueFilters.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.cjs.map +1 -1
- package/build/reactivity/ReactionsManager.d.cts +2 -3
- package/build/reactivity/ReactionsManager.d.cts.map +1 -1
- package/build/reactivity/ReactionsManager.d.mts +2 -3
- package/build/reactivity/ReactionsManager.d.mts.map +1 -1
- package/build/reactivity/ReactionsManager.js.map +1 -1
- package/build/reactivity/reactiveHints.d.cts +18 -18
- package/build/reactivity/reactiveHints.d.cts.map +1 -1
- package/build/reactivity/reactiveHints.d.mts +18 -18
- package/build/reactivity/reactiveHints.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.cjs.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.cts +1 -2
- package/build/relations/AbstractPropertyImpl.d.cts.map +1 -1
- package/build/relations/AbstractPropertyImpl.d.mts +1 -2
- package/build/relations/AbstractPropertyImpl.d.mts.map +1 -1
- package/build/relations/AbstractPropertyImpl.js.map +1 -1
- package/build/relations/AbstractRelationImpl.d.cts +1 -2
- package/build/relations/AbstractRelationImpl.d.cts.map +1 -1
- package/build/relations/AbstractRelationImpl.d.mts +1 -2
- package/build/relations/AbstractRelationImpl.d.mts.map +1 -1
- package/build/relations/AsyncProperty.cjs.map +1 -1
- package/build/relations/AsyncProperty.d.cts +5 -6
- package/build/relations/AsyncProperty.d.cts.map +1 -1
- package/build/relations/AsyncProperty.d.mts +5 -6
- package/build/relations/AsyncProperty.d.mts.map +1 -1
- package/build/relations/AsyncProperty.js.map +1 -1
- package/build/relations/AsyncReactiveField.cjs.map +1 -1
- package/build/relations/AsyncReactiveField.d.cts +4 -5
- package/build/relations/AsyncReactiveField.d.cts.map +1 -1
- package/build/relations/AsyncReactiveField.d.mts +4 -5
- package/build/relations/AsyncReactiveField.d.mts.map +1 -1
- package/build/relations/AsyncReactiveField.js.map +1 -1
- package/build/relations/Collection.d.cts +4 -5
- package/build/relations/Collection.d.cts.map +1 -1
- package/build/relations/Collection.d.mts +4 -5
- package/build/relations/Collection.d.mts.map +1 -1
- package/build/relations/CustomCollection.cjs.map +1 -1
- package/build/relations/CustomCollection.d.cts +3 -4
- package/build/relations/CustomCollection.d.cts.map +1 -1
- package/build/relations/CustomCollection.d.mts +3 -4
- package/build/relations/CustomCollection.d.mts.map +1 -1
- package/build/relations/CustomCollection.js.map +1 -1
- package/build/relations/CustomReference.cjs.map +1 -1
- package/build/relations/CustomReference.d.cts +3 -4
- package/build/relations/CustomReference.d.cts.map +1 -1
- package/build/relations/CustomReference.d.mts +3 -4
- package/build/relations/CustomReference.d.mts.map +1 -1
- package/build/relations/CustomReference.js.map +1 -1
- package/build/relations/EnumCollection.cjs.map +1 -1
- package/build/relations/EnumCollection.d.cts +5 -5
- package/build/relations/EnumCollection.d.cts.map +1 -1
- package/build/relations/EnumCollection.d.mts +5 -5
- package/build/relations/EnumCollection.d.mts.map +1 -1
- package/build/relations/EnumCollection.js.map +1 -1
- package/build/relations/LargeCollection.d.cts +1 -2
- package/build/relations/LargeCollection.d.cts.map +1 -1
- package/build/relations/LargeCollection.d.mts +1 -2
- package/build/relations/LargeCollection.d.mts.map +1 -1
- package/build/relations/LazyField.cjs.map +1 -1
- package/build/relations/LazyField.d.cts +7 -8
- package/build/relations/LazyField.d.cts.map +1 -1
- package/build/relations/LazyField.d.mts +7 -8
- package/build/relations/LazyField.d.mts.map +1 -1
- package/build/relations/LazyField.js.map +1 -1
- package/build/relations/ManyToManyCollection.cjs.map +1 -1
- package/build/relations/ManyToManyCollection.d.cts +2 -3
- package/build/relations/ManyToManyCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyCollection.d.mts +2 -3
- package/build/relations/ManyToManyCollection.d.mts.map +1 -1
- package/build/relations/ManyToManyCollection.js.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.cts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/ManyToManyLargeCollection.d.mts +2 -3
- package/build/relations/ManyToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.cjs.map +1 -1
- package/build/relations/ManyToOneReference.d.cts +6 -7
- package/build/relations/ManyToOneReference.d.cts.map +1 -1
- package/build/relations/ManyToOneReference.d.mts +6 -7
- package/build/relations/ManyToOneReference.d.mts.map +1 -1
- package/build/relations/ManyToOneReference.js.map +1 -1
- package/build/relations/OneToManyCollection.cjs.map +1 -1
- package/build/relations/OneToManyCollection.d.cts +2 -3
- package/build/relations/OneToManyCollection.d.cts.map +1 -1
- package/build/relations/OneToManyCollection.d.mts +2 -3
- package/build/relations/OneToManyCollection.d.mts.map +1 -1
- package/build/relations/OneToManyCollection.js.map +1 -1
- package/build/relations/OneToManyLargeCollection.cjs.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.cts +2 -3
- package/build/relations/OneToManyLargeCollection.d.cts.map +1 -1
- package/build/relations/OneToManyLargeCollection.d.mts +2 -3
- package/build/relations/OneToManyLargeCollection.d.mts.map +1 -1
- package/build/relations/OneToManyLargeCollection.js.map +1 -1
- package/build/relations/OneToOneReference.cjs.map +1 -1
- package/build/relations/OneToOneReference.d.cts +7 -7
- package/build/relations/OneToOneReference.d.cts.map +1 -1
- package/build/relations/OneToOneReference.d.mts +7 -7
- package/build/relations/OneToOneReference.d.mts.map +1 -1
- package/build/relations/OneToOneReference.js.map +1 -1
- package/build/relations/PolymorphicReference.cjs.map +1 -1
- package/build/relations/PolymorphicReference.d.cts +4 -5
- package/build/relations/PolymorphicReference.d.cts.map +1 -1
- package/build/relations/PolymorphicReference.d.mts +4 -5
- package/build/relations/PolymorphicReference.d.mts.map +1 -1
- package/build/relations/PolymorphicReference.js.map +1 -1
- package/build/relations/PropertySymbols.d.cts +1 -2
- package/build/relations/PropertySymbols.d.cts.map +1 -1
- package/build/relations/PropertySymbols.d.mts +1 -2
- package/build/relations/PropertySymbols.d.mts.map +1 -1
- package/build/relations/ReactiveField.cjs.map +1 -1
- package/build/relations/ReactiveField.d.cts +4 -5
- package/build/relations/ReactiveField.d.cts.map +1 -1
- package/build/relations/ReactiveField.d.mts +4 -5
- package/build/relations/ReactiveField.d.mts.map +1 -1
- package/build/relations/ReactiveField.js.map +1 -1
- package/build/relations/ReactiveGetter.cjs.map +1 -1
- package/build/relations/ReactiveGetter.d.cts +4 -5
- package/build/relations/ReactiveGetter.d.cts.map +1 -1
- package/build/relations/ReactiveGetter.d.mts +4 -5
- package/build/relations/ReactiveGetter.d.mts.map +1 -1
- package/build/relations/ReactiveGetter.js.map +1 -1
- package/build/relations/ReactiveManyToMany.cjs.map +1 -1
- package/build/relations/ReactiveManyToMany.d.cts +4 -5
- package/build/relations/ReactiveManyToMany.d.cts.map +1 -1
- package/build/relations/ReactiveManyToMany.d.mts +4 -5
- package/build/relations/ReactiveManyToMany.d.mts.map +1 -1
- package/build/relations/ReactiveManyToMany.js.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.cjs.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.cts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.cts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.d.mts +4 -5
- package/build/relations/ReactiveManyToManyOtherSide.d.mts.map +1 -1
- package/build/relations/ReactiveManyToManyOtherSide.js.map +1 -1
- package/build/relations/ReactiveReference.cjs.map +1 -1
- package/build/relations/ReactiveReference.d.cts +5 -6
- package/build/relations/ReactiveReference.d.cts.map +1 -1
- package/build/relations/ReactiveReference.d.mts +5 -6
- package/build/relations/ReactiveReference.d.mts.map +1 -1
- package/build/relations/ReactiveReference.js.map +1 -1
- package/build/relations/ReadOnlyCollection.d.cts +4 -5
- package/build/relations/ReadOnlyCollection.d.cts.map +1 -1
- package/build/relations/ReadOnlyCollection.d.mts +4 -5
- package/build/relations/ReadOnlyCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.cjs.map +1 -1
- package/build/relations/RecursiveCollection.d.cts +10 -10
- package/build/relations/RecursiveCollection.d.cts.map +1 -1
- package/build/relations/RecursiveCollection.d.mts +10 -10
- package/build/relations/RecursiveCollection.d.mts.map +1 -1
- package/build/relations/RecursiveCollection.js.map +1 -1
- package/build/relations/RecursiveCycleError.d.cts +2 -2
- package/build/relations/RecursiveCycleError.d.cts.map +1 -1
- package/build/relations/RecursiveCycleError.d.mts +2 -2
- package/build/relations/RecursiveCycleError.d.mts.map +1 -1
- package/build/relations/Reference.d.cts +5 -5
- package/build/relations/Reference.d.cts.map +1 -1
- package/build/relations/Reference.d.mts +5 -5
- package/build/relations/Reference.d.mts.map +1 -1
- package/build/relations/ReferenceSymbols.d.cts +1 -2
- package/build/relations/ReferenceSymbols.d.cts.map +1 -1
- package/build/relations/ReferenceSymbols.d.mts +1 -2
- package/build/relations/ReferenceSymbols.d.mts.map +1 -1
- package/build/relations/Relation.d.cts +3 -3
- package/build/relations/Relation.d.cts.map +1 -1
- package/build/relations/Relation.d.mts +3 -3
- package/build/relations/Relation.d.mts.map +1 -1
- package/build/relations/RelationSymbols.d.cts +2 -3
- package/build/relations/RelationSymbols.d.cts.map +1 -1
- package/build/relations/RelationSymbols.d.mts +2 -3
- package/build/relations/RelationSymbols.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.cjs.map +1 -1
- package/build/relations/hasAsyncMethod.d.cts +6 -6
- package/build/relations/hasAsyncMethod.d.cts.map +1 -1
- package/build/relations/hasAsyncMethod.d.mts +6 -6
- package/build/relations/hasAsyncMethod.d.mts.map +1 -1
- package/build/relations/hasAsyncMethod.js.map +1 -1
- package/build/relations/hasManyDerived.d.cts +2 -2
- package/build/relations/hasManyDerived.d.cts.map +1 -1
- package/build/relations/hasManyDerived.d.mts +2 -2
- package/build/relations/hasManyDerived.d.mts.map +1 -1
- package/build/relations/hasManyThrough.d.cts +1 -2
- package/build/relations/hasManyThrough.d.cts.map +1 -1
- package/build/relations/hasManyThrough.d.mts +1 -2
- package/build/relations/hasManyThrough.d.mts.map +1 -1
- package/build/relations/hasOneDerived.d.cts +1 -2
- package/build/relations/hasOneDerived.d.cts.map +1 -1
- package/build/relations/hasOneDerived.d.mts +1 -2
- package/build/relations/hasOneDerived.d.mts.map +1 -1
- package/build/relations/hasOneThrough.d.cts +1 -2
- package/build/relations/hasOneThrough.d.cts.map +1 -1
- package/build/relations/hasOneThrough.d.mts +1 -2
- package/build/relations/hasOneThrough.d.mts.map +1 -1
- package/build/relations/hasProperty.cjs.map +1 -1
- package/build/relations/hasProperty.d.cts +8 -8
- package/build/relations/hasProperty.d.cts.map +1 -1
- package/build/relations/hasProperty.d.mts +8 -8
- package/build/relations/hasProperty.d.mts.map +1 -1
- package/build/relations/hasProperty.js.map +1 -1
- package/build/relations/isCascadeDelete.d.cts +1 -2
- package/build/relations/isCascadeDelete.d.cts.map +1 -1
- package/build/relations/isCascadeDelete.d.mts +1 -2
- package/build/relations/isCascadeDelete.d.mts.map +1 -1
- package/build/resurrection.d.cts +3 -4
- package/build/resurrection.d.cts.map +1 -1
- package/build/resurrection.d.mts +3 -4
- package/build/resurrection.d.mts.map +1 -1
- package/build/rules.d.cts +20 -20
- package/build/rules.d.cts.map +1 -1
- package/build/rules.d.mts +20 -20
- package/build/rules.d.mts.map +1 -1
- package/build/runtimeConfig.d.cts +4 -5
- package/build/runtimeConfig.d.cts.map +1 -1
- package/build/runtimeConfig.d.mts +4 -5
- package/build/runtimeConfig.d.mts.map +1 -1
- package/build/serde/TypeInfo.d.cts +3 -4
- package/build/serde/TypeInfo.d.cts.map +1 -1
- package/build/serde/TypeInfo.d.mts +3 -4
- package/build/serde/TypeInfo.d.mts.map +1 -1
- package/build/serde/columns.d.cts +2 -3
- package/build/serde/columns.d.cts.map +1 -1
- package/build/serde/columns.d.mts +2 -3
- package/build/serde/columns.d.mts.map +1 -1
- package/build/serde/fieldSerde.d.cts +9 -9
- package/build/serde/fieldSerde.d.cts.map +1 -1
- package/build/serde/fieldSerde.d.mts +9 -9
- package/build/serde/fieldSerde.d.mts.map +1 -1
- package/build/serde/serde.d.cts +18 -19
- package/build/serde/serde.d.cts.map +1 -1
- package/build/serde/serde.d.mts +18 -19
- package/build/serde/serde.d.mts.map +1 -1
- package/build/serde/temporal.d.cts +5 -5
- package/build/serde/temporal.d.cts.map +1 -1
- package/build/serde/temporal.d.mts +5 -5
- package/build/serde/temporal.d.mts.map +1 -1
- package/build/serde/temporalMappers.d.cts +4 -5
- package/build/serde/temporalMappers.d.cts.map +1 -1
- package/build/serde/temporalMappers.d.mts +4 -5
- package/build/serde/temporalMappers.d.mts.map +1 -1
- package/build/transitions.d.cts +17 -18
- package/build/transitions.d.cts.map +1 -1
- package/build/transitions.d.mts +17 -18
- package/build/transitions.d.mts.map +1 -1
- package/build/trusted.d.cts +2 -3
- package/build/trusted.d.cts.map +1 -1
- package/build/trusted.d.mts +2 -3
- package/build/trusted.d.mts.map +1 -1
- package/build/typeMap.d.cts +17 -17
- package/build/typeMap.d.cts.map +1 -1
- package/build/typeMap.d.mts +17 -17
- package/build/typeMap.d.mts.map +1 -1
- package/build/upsert.d.cts +4 -4
- package/build/upsert.d.cts.map +1 -1
- package/build/upsert.d.mts +4 -4
- package/build/upsert.d.mts.map +1 -1
- package/build/utils.d.cts +27 -28
- package/build/utils.d.cts.map +1 -1
- package/build/utils.d.mts +27 -28
- package/build/utils.d.mts.map +1 -1
- package/package.json +4 -4
|
@@ -6,7 +6,7 @@ import { IdOf } from "../../EntityManager.mjs";
|
|
|
6
6
|
import { Entity } from "../../Entity.mjs";
|
|
7
7
|
//#region src/queries/sql/JoinTree.d.ts
|
|
8
8
|
/** Domain filters and optional table bindings for one node in a relationship tree. */
|
|
9
|
-
type JoinTree<T extends Entity> = Omit<TableFilter<T>, RelationNames<T>> & {
|
|
9
|
+
export type JoinTree<T extends Entity> = Omit<TableFilter<T>, RelationNames<T>> & {
|
|
10
10
|
readonly as?: TableFor<T>;
|
|
11
11
|
} & { readonly [K in RelationNames<T>]?: FieldsOf<T>[K] extends {
|
|
12
12
|
kind: "m2o" | "o2m" | "lo2m" | "m2m" | "o2o";
|
|
@@ -52,7 +52,7 @@ type RelationNames<T extends Entity> = { [K in keyof FieldsOf<T>]: FieldsOf<T>[K
|
|
|
52
52
|
* - Validate `title` against `Book`, and
|
|
53
53
|
* - Retain `typeof b` for result typing.
|
|
54
54
|
*/
|
|
55
|
-
type CheckJoinInput<F, J> = QueryJoinInput extends J ? {
|
|
55
|
+
export type CheckJoinInput<F, J> = QueryJoinInput extends J ? {
|
|
56
56
|
join?: "join was typed too generically; use `satisfies Query` instead of `: Query`";
|
|
57
57
|
} : [J] extends [readonly unknown[]] ? unknown : F extends TableFor<infer T extends Entity> ? {
|
|
58
58
|
join?: JoinTree<T> & CheckTree<T, J>;
|
|
@@ -66,7 +66,7 @@ type CheckJoinInput<F, J> = QueryJoinInput extends J ? {
|
|
|
66
66
|
*
|
|
67
67
|
* I.e. Author.books.author uses LEFT joins for both Book and its Author because an Author may have no Books.
|
|
68
68
|
*/
|
|
69
|
-
type TreeEntries<T extends Entity, J, Nullable extends boolean = false> = string extends keyof J ? never : "as" extends keyof J ? JoinTree<T> extends J ? never : TreeEntriesImpl<T, J, Nullable> : TreeEntriesImpl<T, J, Nullable>;
|
|
69
|
+
export type TreeEntries<T extends Entity, J, Nullable extends boolean = false> = string extends keyof J ? never : "as" extends keyof J ? JoinTree<T> extends J ? never : TreeEntriesImpl<T, J, Nullable> : TreeEntriesImpl<T, J, Nullable>;
|
|
70
70
|
/** Collects join entries from the relationship keys supplied in this tree node. */
|
|
71
71
|
type TreeEntriesImpl<T extends Entity, J, Nullable extends boolean> = { [K in keyof J & keyof FieldsOf<T>]: FieldsOf<T>[K] extends {
|
|
72
72
|
kind: "m2o" | "o2m" | "lo2m" | "m2m" | "o2o";
|
|
@@ -98,10 +98,10 @@ type CheckRelationTree<T extends Entity, J> = J extends object ? "ne" extends ke
|
|
|
98
98
|
* Handles remain query-local; no SQL aliases or caller objects are changed.
|
|
99
99
|
* I.e. Author.books.author emits Book before its Author, even if only the final Author has an as binding.
|
|
100
100
|
*/
|
|
101
|
-
declare function compileJoinTree(from: unknown, tree: unknown): {
|
|
101
|
+
export declare function compileJoinTree(from: unknown, tree: unknown): {
|
|
102
102
|
joins: QueryJoin[];
|
|
103
103
|
condition: QueryCondition;
|
|
104
104
|
};
|
|
105
105
|
//#endregion
|
|
106
|
-
export {
|
|
106
|
+
export {};
|
|
107
107
|
//# sourceMappingURL=JoinTree.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoinTree.d.mts","names":[],"sources":["../../../src/queries/sql/JoinTree.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"JoinTree.d.mts","names":[],"sources":["../../../src/queries/sql/JoinTree.ts"],"mappings":";;;;;;;;YAkBY,SAAS,UAAU,UAAU,KAAK,YAAY,IAAI,cAAc;WACjE,KAAK,SAAS;gBAEb,KAAK,cAAc,MAAM,SAAS,GAAG;EAC7C;EACA,YAAY,UAAU;IAEpB,SAAS,MAAM,gBAAgB,YAAY,KAAK,YAAY,GAAG,KAAK,mBAAmB;;;;;;;;;;;;KAexF,mBAAmB,UAAU,UAC9B,KAAK,KACL,cACU,KAAK,KAAK;EAGlB,IAAI,KAAK,KAAK;;KAEf,cAAc,UAAU,aAC1B,WAAW,SAAS,KAAK,SAAS,GAAG;EAAa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8
8
|
import { Entity } from "../../Entity.cjs";
|
|
9
9
|
//#region src/queries/sql/Tables.d.ts
|
|
10
10
|
/** Creates physical column expressions and relationship joins for `T`. */
|
|
11
|
-
declare function table<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
11
|
+
export declare function table<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
12
12
|
/** Creates a typed physical handle for a table declared with `declareTable`. */
|
|
13
|
-
declare function table<TableName extends string, C extends CustomColumnInputs>(definition: CustomTableDefinition<TableName, C>): CustomTable<C, TableName>;
|
|
13
|
+
export declare function table<TableName extends string, C extends CustomColumnInputs>(definition: CustomTableDefinition<TableName, C>): CustomTable<C, TableName>;
|
|
14
14
|
/**
|
|
15
15
|
* Creates a table with an explicit type-level name, i.e. `table(Author, "m")` for a self-join.
|
|
16
16
|
*
|
|
17
17
|
* The name is the table's source key in `em.query`: two bare `table(Author)`s share the key `"Author"`,
|
|
18
18
|
* so a left-joined mentor would also mark the mentee's columns nullable; a named alias has its own key.
|
|
19
19
|
*/
|
|
20
|
-
declare function table<T extends Entity, Name extends string>(cstr: MaybeAbstractEntityConstructor<T>, name: Name): Table<T, Name>;
|
|
20
|
+
export declare function table<T extends Entity, Name extends string>(cstr: MaybeAbstractEntityConstructor<T>, name: Name): Table<T, Name>;
|
|
21
21
|
/** Creates a named custom-table handle for joins and self-joins. */
|
|
22
|
-
declare function table<C extends CustomColumnInputs, TableName extends string, Name extends string>(definition: CustomTableDefinition<TableName, C>, name: Name): CustomTable<C, Name>;
|
|
22
|
+
export declare function table<C extends CustomColumnInputs, TableName extends string, Name extends string>(definition: CustomTableDefinition<TableName, C>, name: Name): CustomTable<C, Name>;
|
|
23
23
|
/** Creates multiple physical table handles. */
|
|
24
|
-
declare function tables<T extends readonly MaybeAbstractEntityConstructor<any>[]>(...type: T): { [P in keyof T]: T[P] extends MaybeAbstractEntityConstructor<infer E extends Entity> ? Table<E> : never; };
|
|
24
|
+
export declare function tables<T extends readonly MaybeAbstractEntityConstructor<any>[]>(...type: T): { [P in keyof T]: T[P] extends MaybeAbstractEntityConstructor<infer E extends Entity> ? Table<E> : never; };
|
|
25
25
|
/**
|
|
26
26
|
* The runtime management interface plus phantom type information for `em.query`.
|
|
27
27
|
*
|
|
28
28
|
* `__entity` lets `QueryRow` recover `T` for entity mode (you cannot `infer T` back out of a mapped
|
|
29
29
|
* type), and `__name` is the table's source key (see `Expr`).
|
|
30
30
|
*/
|
|
31
|
-
interface TableSourceBrand<Name extends string> extends TableSourceMgmt {
|
|
31
|
+
export interface TableSourceBrand<Name extends string> extends TableSourceMgmt {
|
|
32
32
|
readonly __name: Name;
|
|
33
33
|
}
|
|
34
34
|
/** A modeled table source that can hydrate its generated entity type. */
|
|
35
|
-
interface TableBrand<T, Name extends string> extends TableSourceBrand<Name>, TableMgmt {
|
|
35
|
+
export interface TableBrand<T, Name extends string> extends TableSourceBrand<Name>, TableMgmt {
|
|
36
36
|
readonly __entity: T;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -60,7 +60,7 @@ interface TableBrand<T, Name extends string> extends TableSourceBrand<Name>, Tab
|
|
|
60
60
|
* LEFT-joined SmallPublisher does not make Publisher columns nullable. `table(Author, "m")`
|
|
61
61
|
* gives a self-join table its own key.
|
|
62
62
|
*/
|
|
63
|
-
type Table<T extends Entity, Name extends string = TableNameOf<T>> = TableShape<T, Name> & ("where" extends keyof TableShape<T, Name> ? {} : {
|
|
63
|
+
export type Table<T extends Entity, Name extends string = TableNameOf<T>> = TableShape<T, Name> & ("where" extends keyof TableShape<T, Name> ? {} : {
|
|
64
64
|
/** Builds an AND condition from local domain fields, without implicit joins. */
|
|
65
65
|
where(filter: TableFilter<T>): SqlCondition;
|
|
66
66
|
}) & ("column" extends keyof TableShape<T, Name> ? {} : {
|
|
@@ -77,7 +77,7 @@ type Table<T extends Entity, Name extends string = TableNameOf<T>> = TableShape<
|
|
|
77
77
|
column<R = unknown>(column: string): Expr<R, Name>;
|
|
78
78
|
});
|
|
79
79
|
/** Domain filters for fields stored on this physical table, without relationship traversal. */
|
|
80
|
-
type TableFilter<T extends Entity> = { [K in LocalFieldNames<T> & keyof FieldsOf<T>]?: FieldsOf<T>[K] extends {
|
|
80
|
+
export type TableFilter<T extends Entity> = { [K in LocalFieldNames<T> & keyof FieldsOf<T>]?: FieldsOf<T>[K] extends {
|
|
81
81
|
kind: "m2o";
|
|
82
82
|
type: infer U extends Entity;
|
|
83
83
|
nullable: infer N;
|
|
@@ -129,7 +129,7 @@ type TableNameOf<T> = T extends {
|
|
|
129
129
|
};
|
|
130
130
|
} ? TypeNameOf<T> & string : string;
|
|
131
131
|
/** Provides fluent methods for creating joins through an owning reference relationship. */
|
|
132
|
-
interface ReferenceJoin<U extends Entity, N extends null | never, Src extends string = string> {
|
|
132
|
+
export interface ReferenceJoin<U extends Entity, N extends null | never, Src extends string = string> {
|
|
133
133
|
/**
|
|
134
134
|
* Required reference joins like `b.author.as(a)` are INNER unless `b` is already a LEFT-joined alias.
|
|
135
135
|
* Nullable references are always LEFT joined.
|
|
@@ -139,13 +139,13 @@ interface ReferenceJoin<U extends Entity, N extends null | never, Src extends st
|
|
|
139
139
|
left<A extends TableFor<U>>(other: A): LeftJoin<A>;
|
|
140
140
|
}
|
|
141
141
|
/** The source of a default reference join, used to inherit optional paths within each query. */
|
|
142
|
-
declare const referenceJoinSource: unique symbol;
|
|
142
|
+
export declare const referenceJoinSource: unique symbol;
|
|
143
143
|
/** A required reference defaults to INNER unless its source was LEFT joined. */
|
|
144
|
-
type DefaultReferenceJoin<A, Src extends string> = InnerJoin<A> & {
|
|
144
|
+
export type DefaultReferenceJoin<A, Src extends string> = InnerJoin<A> & {
|
|
145
145
|
readonly [referenceJoinSource]: Src;
|
|
146
146
|
};
|
|
147
147
|
/** Any table whose entity is (a subtype of) `U`, i.e. what a relation join factory accepts. */
|
|
148
|
-
type TableFor<U> = {
|
|
148
|
+
export type TableFor<U> = {
|
|
149
149
|
readonly [tableMgmt]: TableBrand<U, string>;
|
|
150
150
|
};
|
|
151
151
|
/**
|
|
@@ -158,7 +158,7 @@ type TableFor<U> = {
|
|
|
158
158
|
* `.inner(b)` opts into filtering. An m2m entry carries a hidden second join through the join table,
|
|
159
159
|
* which the parser expands; the pair prunes together.
|
|
160
160
|
*/
|
|
161
|
-
interface CollectionJoin<U extends Entity> {
|
|
161
|
+
export interface CollectionJoin<U extends Entity> {
|
|
162
162
|
as<A extends TableFor<U>>(other: A): LeftJoin<A>;
|
|
163
163
|
inner<A extends TableFor<U>>(other: A): InnerJoin<A>;
|
|
164
164
|
left<A extends TableFor<U>>(other: A): LeftJoin<A>;
|
|
@@ -172,20 +172,20 @@ interface SubtypeJoin<U extends Entity> extends CollectionJoin<U> {
|
|
|
172
172
|
* (`b.authorId.as(a)` joins). The default join kind follows physical column nullability:
|
|
173
173
|
* a NOT NULL FK is INNER unless its source was LEFT joined, a nullable one is LEFT, and the row type reflects it.
|
|
174
174
|
*/
|
|
175
|
-
interface ReferenceColumn<U extends Entity, N extends null | never, Src extends string, Key extends string = string> extends EntityColumn<U, N, Src, Key>, ReferenceJoin<U, N, Src> {}
|
|
175
|
+
export interface ReferenceColumn<U extends Entity, N extends null | never, Src extends string, Key extends string = string> extends EntityColumn<U, N, Src, Key>, ReferenceJoin<U, N, Src> {}
|
|
176
176
|
/**
|
|
177
177
|
* A polymorphic reference: condition methods (each resolving the component column from the value), plus
|
|
178
178
|
* a join factory that picks the component from the argument's entity, i.e. `c.parent.as(a)` joins
|
|
179
179
|
* through `parent_author_id`, like an explicit join with `on: c.parent.eq(a.id)`.
|
|
180
180
|
*/
|
|
181
|
-
interface PolyReference<U extends Entity, N extends null | never, Src extends string = string> extends ReferenceJoin<U, N, Src> {
|
|
181
|
+
export interface PolyReference<U extends Entity, N extends null | never, Src extends string = string> extends ReferenceJoin<U, N, Src> {
|
|
182
182
|
eq(value: U | TaggedId | ExprLike<IdOf<U> | null> | null | undefined): SqlCondition;
|
|
183
183
|
ne(value: U | TaggedId | ExprLike<IdOf<U> | null> | null | undefined): SqlCondition;
|
|
184
184
|
in(values: readonly (U | TaggedId)[] | ExprLike<IdOf<U> | null> | undefined): SqlCondition;
|
|
185
185
|
/** Applies an IN condition unless the list is empty or undefined. */
|
|
186
186
|
inNonEmpty(values: readonly (U | TaggedId)[] | undefined): SqlCondition;
|
|
187
187
|
}
|
|
188
|
-
interface PrimitiveColumn<V, N extends null | never, Src extends string = string, Key extends string = string> extends Expr<V | N, Src> {
|
|
188
|
+
export interface PrimitiveColumn<V, N extends null | never, Src extends string = string, Key extends string = string> extends Expr<V | N, Src> {
|
|
189
189
|
readonly [selectKeyBrand]: Key;
|
|
190
190
|
eq(value: V | ExprLike<V | N> | N | undefined): SqlCondition;
|
|
191
191
|
ne(value: V | ExprLike<V | N> | N | undefined): SqlCondition;
|
|
@@ -233,7 +233,7 @@ interface PrimitiveColumn<V, N extends null | never, Src extends string = string
|
|
|
233
233
|
*/
|
|
234
234
|
raw(exp: string, bindings: readonly any[] | undefined): SqlCondition;
|
|
235
235
|
}
|
|
236
|
-
interface EntityColumn<T, N extends null | never = never, Src extends string = string, Key extends string = string> extends Expr<IdOf<T> | N, Src> {
|
|
236
|
+
export interface EntityColumn<T, N extends null | never = never, Src extends string = string, Key extends string = string> extends Expr<IdOf<T> | N, Src> {
|
|
237
237
|
readonly [selectKeyBrand]: Key;
|
|
238
238
|
/** Produces the tagged ID as SQL text, preserving NULL and the column's source. */
|
|
239
239
|
taggedId(): Expr<string | N, Src>;
|
|
@@ -250,27 +250,27 @@ interface EntityColumn<T, N extends null | never = never, Src extends string = s
|
|
|
250
250
|
lte(value: IdOf<T> | ExprLike<IdOf<T> | null> | null | undefined): SqlCondition;
|
|
251
251
|
raw(exp: string, bindings: readonly any[] | undefined): SqlCondition;
|
|
252
252
|
}
|
|
253
|
-
declare const tableMgmt: unique symbol;
|
|
254
|
-
declare const inQueryCondition: unique symbol;
|
|
253
|
+
export declare const tableMgmt: unique symbol;
|
|
254
|
+
export declare const inQueryCondition: unique symbol;
|
|
255
255
|
/** Defers a direct IN query literal to query.ts, which owns query pruning and SQL generation. */
|
|
256
|
-
interface InQueryCondition {
|
|
256
|
+
export interface InQueryCondition {
|
|
257
257
|
readonly [inQueryCondition]: {
|
|
258
258
|
column: BaseExpr;
|
|
259
259
|
query: object;
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
declare function getTableMgmt<T extends Entity>(table: TableFor<T>): TableMgmt;
|
|
263
|
-
declare function getTableMgmt(table: CustomTableFor): CustomTableMgmt;
|
|
264
|
-
declare function getTableMgmt(table: TableFor<Entity> | CustomTableFor): TableSourceMgmt;
|
|
262
|
+
export declare function getTableMgmt<T extends Entity>(table: TableFor<T>): TableMgmt;
|
|
263
|
+
export declare function getTableMgmt(table: CustomTableFor): CustomTableMgmt;
|
|
264
|
+
export declare function getTableMgmt(table: TableFor<Entity> | CustomTableFor): TableSourceMgmt;
|
|
265
265
|
/** The identity SQL queries bind a table by, plus its original entity metadata. */
|
|
266
|
-
interface TableSourceMgmt {
|
|
266
|
+
export interface TableSourceMgmt {
|
|
267
267
|
tableName: string;
|
|
268
268
|
schema?: string;
|
|
269
269
|
}
|
|
270
270
|
/** Qualifies custom tables without changing SQL for tables on the default search path. */
|
|
271
|
-
declare function tableSqlName(table: TableSourceMgmt): string;
|
|
271
|
+
export declare function tableSqlName(table: TableSourceMgmt): string;
|
|
272
272
|
/** The identity and generated metadata of a modeled entity table. */
|
|
273
|
-
interface TableMgmt extends TableSourceMgmt {
|
|
273
|
+
export interface TableMgmt extends TableSourceMgmt {
|
|
274
274
|
/**
|
|
275
275
|
* The metadata this table was created with, i.e. `table(TaskNew)` keeps `taskNewMeta`.
|
|
276
276
|
*
|
|
@@ -281,27 +281,27 @@ interface TableMgmt extends TableSourceMgmt {
|
|
|
281
281
|
meta: EntityMetadata;
|
|
282
282
|
}
|
|
283
283
|
/** Returns the metadata for the entity that `table` is bound to. */
|
|
284
|
-
declare function getTableMetadata<T extends Entity>(table: TableFor<T>): EntityMetadata<T>;
|
|
285
|
-
declare function newTableProxy<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
286
|
-
declare function isTable(obj: unknown): obj is Table<any, any> | CustomTableFor;
|
|
284
|
+
export declare function getTableMetadata<T extends Entity>(table: TableFor<T>): EntityMetadata<T>;
|
|
285
|
+
export declare function newTableProxy<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
286
|
+
export declare function isTable(obj: unknown): obj is Table<any, any> | CustomTableFor;
|
|
287
287
|
/** Whether a physical table has generated entity metadata. */
|
|
288
|
-
declare function isEntityTable(obj: unknown): obj is Table<any, any>;
|
|
288
|
+
export declare function isEntityTable(obj: unknown): obj is Table<any, any>;
|
|
289
289
|
/** Whether a physical table has columns declared through `declareTable`. */
|
|
290
|
-
declare function isCustomTable(obj: unknown): obj is CustomTableFor;
|
|
290
|
+
export declare function isCustomTable(obj: unknown): obj is CustomTableFor;
|
|
291
291
|
/**
|
|
292
292
|
* Marks a sugar join entry whose target is a *collection* (o2m/m2m), which filter soft-deletes like
|
|
293
293
|
* em.find's "collections filter out soft-deletes, but m2o/o2o references still return them"; see
|
|
294
294
|
* `QueryParser.addSoftDeleteCondition`'s call site. Reference joins and explicit joins are unmarked.
|
|
295
295
|
*/
|
|
296
|
-
declare const collectionJoin: unique symbol;
|
|
296
|
+
export declare const collectionJoin: unique symbol;
|
|
297
297
|
/** Marks a sugar m2m join entry (`a.tags.as(t)`) with its hidden join-table join; `parseQuery` expands it. */
|
|
298
|
-
declare const m2mJoinTable: unique symbol;
|
|
299
|
-
interface M2mJoinTable {
|
|
298
|
+
export declare const m2mJoinTable: unique symbol;
|
|
299
|
+
export interface M2mJoinTable {
|
|
300
300
|
handle: JoinTableHandle;
|
|
301
301
|
on: SqlCondition;
|
|
302
302
|
}
|
|
303
303
|
/** The runtime identity of an m2m join table in a query, i.e. `authors_to_tags`; it has no entity. */
|
|
304
|
-
declare class JoinTableHandle {
|
|
304
|
+
export declare class JoinTableHandle {
|
|
305
305
|
readonly joinTableName: string;
|
|
306
306
|
constructor(joinTableName: string);
|
|
307
307
|
}
|
|
@@ -310,13 +310,13 @@ declare class JoinTableHandle {
|
|
|
310
310
|
* I.e. Author.firstName uses the first_name column but resolves its alias in each query scope.
|
|
311
311
|
* Collections, polymorphic references, and inherited nonlocal fields require explicit expressions.
|
|
312
312
|
*/
|
|
313
|
-
declare function tableWhere(mgmt: TableMgmt, filter: object): SqlCondition;
|
|
313
|
+
export declare function tableWhere(mgmt: TableMgmt, filter: object): SqlCondition;
|
|
314
314
|
/**
|
|
315
315
|
* Converts relationship filters into conditions on the joined table's id column.
|
|
316
316
|
* I.e. Author's `join: { books: "b:1" }` filters Book.id to 1; `{ books: book }` uses book.id.
|
|
317
317
|
* Lists match any supplied ID, `true` requires a Book, and `null` or `false` requires no Book.
|
|
318
318
|
*/
|
|
319
|
-
declare function tableEntityWhere(mgmt: TableMgmt, value: unknown): SqlCondition;
|
|
319
|
+
export declare function tableEntityWhere(mgmt: TableMgmt, value: unknown): SqlCondition;
|
|
320
320
|
//#endregion
|
|
321
|
-
export {
|
|
321
|
+
export {};
|
|
322
322
|
//# sourceMappingURL=Tables.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tables.d.cts","names":[],"sources":["../../../src/queries/sql/Tables.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Tables.d.cts","names":[],"sources":["../../../src/queries/sql/Tables.ts"],"mappings":";;;;;;;;;;wBAyDgB,MAAM,UAAU,QAAQ,MAAM,+BAA+B,KAAK,MAAM;;wBAExE,MAAM,0BAA0B,UAAU,oBACxD,YAAY,sBAAsB,WAAW,KAC5C,YAAY,GAAG;;;;;;;wBAOF,MAAM,UAAU,QAAQ,qBACtC,MAAM,+BAA+B,IACrC,MAAM,OACL,MAAM,GAAG;;wBAEI,MAAM,UAAU,oBAAoB,0BAA0B,qBAC5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,GAAG,iBAAiB,IAAI,KAAK,eAAe,SAAS,KAAK,gCAAgC;;EAE1F,WAAW,iBAAiB,IAAI,KAAK,kCAAkC;EACvE,IAAI,iBAAiB,IAAI,KAAK,eAAe,SAAS,KAAK,gCAAgC;EAC3F,GAAG,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EAClE,IAAI,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EACnE,GAAG,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EAClE,IAAI,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EACnE,IAAI,aAAa,uCAAuC;;qBAG7C;qBACA;;iBAGI;YACL;IAAqB,QAAQ;IAAU;;;wBAGnC,aAAa,UAAU,QAAQ,OAAO,SAAS,KAAK;wBACpD,aAAa,OAAO,iBAAiB;wBACrC,aAAa,OAAO,SAAS,UAAU,iBAAiB;;iBAMvD;EACf;EACA;;;wBAIc,aAAa,OAAO;;iBAKnB,kBAAkB;;;;;;;;EAQjC,MAAM;;;wBAIQ,iBAAiB,UAAU,QAAQ,OAAO,SAAS,KAAK,eAAe;wBAKvE,cAAc,UAAU,QAAQ,MAAM,+BAA+B,KAAK,MAAM;wBA0FhF,QAAQ,eAAe,OAAO,kBAAkB;;wBAKhD,cAAc,eAAe,OAAO;;wBAKpC,cAAc,eAAe,OAAO;;;;;;qBA+bvC;;qBAGA;iBAEI;EACf,QAAQ;EACR,IAAI;;;qBAIO;WACU;EAArB,YAAqB;;;;;;;wBA8LP,WAAW,MAAM,WAAW,iBAAiB;;;;;;wBAwD7C,iBAAiB,MAAM,WAAW,iBAAiB"}
|
|
@@ -8,31 +8,31 @@ import { IdOf, MaybeAbstractEntityConstructor, TaggedId } from "../../EntityMana
|
|
|
8
8
|
import { Entity } from "../../Entity.mjs";
|
|
9
9
|
//#region src/queries/sql/Tables.d.ts
|
|
10
10
|
/** Creates physical column expressions and relationship joins for `T`. */
|
|
11
|
-
declare function table<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
11
|
+
export declare function table<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
12
12
|
/** Creates a typed physical handle for a table declared with `declareTable`. */
|
|
13
|
-
declare function table<TableName extends string, C extends CustomColumnInputs>(definition: CustomTableDefinition<TableName, C>): CustomTable<C, TableName>;
|
|
13
|
+
export declare function table<TableName extends string, C extends CustomColumnInputs>(definition: CustomTableDefinition<TableName, C>): CustomTable<C, TableName>;
|
|
14
14
|
/**
|
|
15
15
|
* Creates a table with an explicit type-level name, i.e. `table(Author, "m")` for a self-join.
|
|
16
16
|
*
|
|
17
17
|
* The name is the table's source key in `em.query`: two bare `table(Author)`s share the key `"Author"`,
|
|
18
18
|
* so a left-joined mentor would also mark the mentee's columns nullable; a named alias has its own key.
|
|
19
19
|
*/
|
|
20
|
-
declare function table<T extends Entity, Name extends string>(cstr: MaybeAbstractEntityConstructor<T>, name: Name): Table<T, Name>;
|
|
20
|
+
export declare function table<T extends Entity, Name extends string>(cstr: MaybeAbstractEntityConstructor<T>, name: Name): Table<T, Name>;
|
|
21
21
|
/** Creates a named custom-table handle for joins and self-joins. */
|
|
22
|
-
declare function table<C extends CustomColumnInputs, TableName extends string, Name extends string>(definition: CustomTableDefinition<TableName, C>, name: Name): CustomTable<C, Name>;
|
|
22
|
+
export declare function table<C extends CustomColumnInputs, TableName extends string, Name extends string>(definition: CustomTableDefinition<TableName, C>, name: Name): CustomTable<C, Name>;
|
|
23
23
|
/** Creates multiple physical table handles. */
|
|
24
|
-
declare function tables<T extends readonly MaybeAbstractEntityConstructor<any>[]>(...type: T): { [P in keyof T]: T[P] extends MaybeAbstractEntityConstructor<infer E extends Entity> ? Table<E> : never; };
|
|
24
|
+
export declare function tables<T extends readonly MaybeAbstractEntityConstructor<any>[]>(...type: T): { [P in keyof T]: T[P] extends MaybeAbstractEntityConstructor<infer E extends Entity> ? Table<E> : never; };
|
|
25
25
|
/**
|
|
26
26
|
* The runtime management interface plus phantom type information for `em.query`.
|
|
27
27
|
*
|
|
28
28
|
* `__entity` lets `QueryRow` recover `T` for entity mode (you cannot `infer T` back out of a mapped
|
|
29
29
|
* type), and `__name` is the table's source key (see `Expr`).
|
|
30
30
|
*/
|
|
31
|
-
interface TableSourceBrand<Name extends string> extends TableSourceMgmt {
|
|
31
|
+
export interface TableSourceBrand<Name extends string> extends TableSourceMgmt {
|
|
32
32
|
readonly __name: Name;
|
|
33
33
|
}
|
|
34
34
|
/** A modeled table source that can hydrate its generated entity type. */
|
|
35
|
-
interface TableBrand<T, Name extends string> extends TableSourceBrand<Name>, TableMgmt {
|
|
35
|
+
export interface TableBrand<T, Name extends string> extends TableSourceBrand<Name>, TableMgmt {
|
|
36
36
|
readonly __entity: T;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -60,7 +60,7 @@ interface TableBrand<T, Name extends string> extends TableSourceBrand<Name>, Tab
|
|
|
60
60
|
* LEFT-joined SmallPublisher does not make Publisher columns nullable. `table(Author, "m")`
|
|
61
61
|
* gives a self-join table its own key.
|
|
62
62
|
*/
|
|
63
|
-
type Table<T extends Entity, Name extends string = TableNameOf<T>> = TableShape<T, Name> & ("where" extends keyof TableShape<T, Name> ? {} : {
|
|
63
|
+
export type Table<T extends Entity, Name extends string = TableNameOf<T>> = TableShape<T, Name> & ("where" extends keyof TableShape<T, Name> ? {} : {
|
|
64
64
|
/** Builds an AND condition from local domain fields, without implicit joins. */
|
|
65
65
|
where(filter: TableFilter<T>): SqlCondition;
|
|
66
66
|
}) & ("column" extends keyof TableShape<T, Name> ? {} : {
|
|
@@ -77,7 +77,7 @@ type Table<T extends Entity, Name extends string = TableNameOf<T>> = TableShape<
|
|
|
77
77
|
column<R = unknown>(column: string): Expr<R, Name>;
|
|
78
78
|
});
|
|
79
79
|
/** Domain filters for fields stored on this physical table, without relationship traversal. */
|
|
80
|
-
type TableFilter<T extends Entity> = { [K in LocalFieldNames<T> & keyof FieldsOf<T>]?: FieldsOf<T>[K] extends {
|
|
80
|
+
export type TableFilter<T extends Entity> = { [K in LocalFieldNames<T> & keyof FieldsOf<T>]?: FieldsOf<T>[K] extends {
|
|
81
81
|
kind: "m2o";
|
|
82
82
|
type: infer U extends Entity;
|
|
83
83
|
nullable: infer N;
|
|
@@ -129,7 +129,7 @@ type TableNameOf<T> = T extends {
|
|
|
129
129
|
};
|
|
130
130
|
} ? TypeNameOf<T> & string : string;
|
|
131
131
|
/** Provides fluent methods for creating joins through an owning reference relationship. */
|
|
132
|
-
interface ReferenceJoin<U extends Entity, N extends null | never, Src extends string = string> {
|
|
132
|
+
export interface ReferenceJoin<U extends Entity, N extends null | never, Src extends string = string> {
|
|
133
133
|
/**
|
|
134
134
|
* Required reference joins like `b.author.as(a)` are INNER unless `b` is already a LEFT-joined alias.
|
|
135
135
|
* Nullable references are always LEFT joined.
|
|
@@ -139,13 +139,13 @@ interface ReferenceJoin<U extends Entity, N extends null | never, Src extends st
|
|
|
139
139
|
left<A extends TableFor<U>>(other: A): LeftJoin<A>;
|
|
140
140
|
}
|
|
141
141
|
/** The source of a default reference join, used to inherit optional paths within each query. */
|
|
142
|
-
declare const referenceJoinSource: unique symbol;
|
|
142
|
+
export declare const referenceJoinSource: unique symbol;
|
|
143
143
|
/** A required reference defaults to INNER unless its source was LEFT joined. */
|
|
144
|
-
type DefaultReferenceJoin<A, Src extends string> = InnerJoin<A> & {
|
|
144
|
+
export type DefaultReferenceJoin<A, Src extends string> = InnerJoin<A> & {
|
|
145
145
|
readonly [referenceJoinSource]: Src;
|
|
146
146
|
};
|
|
147
147
|
/** Any table whose entity is (a subtype of) `U`, i.e. what a relation join factory accepts. */
|
|
148
|
-
type TableFor<U> = {
|
|
148
|
+
export type TableFor<U> = {
|
|
149
149
|
readonly [tableMgmt]: TableBrand<U, string>;
|
|
150
150
|
};
|
|
151
151
|
/**
|
|
@@ -158,7 +158,7 @@ type TableFor<U> = {
|
|
|
158
158
|
* `.inner(b)` opts into filtering. An m2m entry carries a hidden second join through the join table,
|
|
159
159
|
* which the parser expands; the pair prunes together.
|
|
160
160
|
*/
|
|
161
|
-
interface CollectionJoin<U extends Entity> {
|
|
161
|
+
export interface CollectionJoin<U extends Entity> {
|
|
162
162
|
as<A extends TableFor<U>>(other: A): LeftJoin<A>;
|
|
163
163
|
inner<A extends TableFor<U>>(other: A): InnerJoin<A>;
|
|
164
164
|
left<A extends TableFor<U>>(other: A): LeftJoin<A>;
|
|
@@ -172,20 +172,20 @@ interface SubtypeJoin<U extends Entity> extends CollectionJoin<U> {
|
|
|
172
172
|
* (`b.authorId.as(a)` joins). The default join kind follows physical column nullability:
|
|
173
173
|
* a NOT NULL FK is INNER unless its source was LEFT joined, a nullable one is LEFT, and the row type reflects it.
|
|
174
174
|
*/
|
|
175
|
-
interface ReferenceColumn<U extends Entity, N extends null | never, Src extends string, Key extends string = string> extends EntityColumn<U, N, Src, Key>, ReferenceJoin<U, N, Src> {}
|
|
175
|
+
export interface ReferenceColumn<U extends Entity, N extends null | never, Src extends string, Key extends string = string> extends EntityColumn<U, N, Src, Key>, ReferenceJoin<U, N, Src> {}
|
|
176
176
|
/**
|
|
177
177
|
* A polymorphic reference: condition methods (each resolving the component column from the value), plus
|
|
178
178
|
* a join factory that picks the component from the argument's entity, i.e. `c.parent.as(a)` joins
|
|
179
179
|
* through `parent_author_id`, like an explicit join with `on: c.parent.eq(a.id)`.
|
|
180
180
|
*/
|
|
181
|
-
interface PolyReference<U extends Entity, N extends null | never, Src extends string = string> extends ReferenceJoin<U, N, Src> {
|
|
181
|
+
export interface PolyReference<U extends Entity, N extends null | never, Src extends string = string> extends ReferenceJoin<U, N, Src> {
|
|
182
182
|
eq(value: U | TaggedId | ExprLike<IdOf<U> | null> | null | undefined): SqlCondition;
|
|
183
183
|
ne(value: U | TaggedId | ExprLike<IdOf<U> | null> | null | undefined): SqlCondition;
|
|
184
184
|
in(values: readonly (U | TaggedId)[] | ExprLike<IdOf<U> | null> | undefined): SqlCondition;
|
|
185
185
|
/** Applies an IN condition unless the list is empty or undefined. */
|
|
186
186
|
inNonEmpty(values: readonly (U | TaggedId)[] | undefined): SqlCondition;
|
|
187
187
|
}
|
|
188
|
-
interface PrimitiveColumn<V, N extends null | never, Src extends string = string, Key extends string = string> extends Expr<V | N, Src> {
|
|
188
|
+
export interface PrimitiveColumn<V, N extends null | never, Src extends string = string, Key extends string = string> extends Expr<V | N, Src> {
|
|
189
189
|
readonly [selectKeyBrand]: Key;
|
|
190
190
|
eq(value: V | ExprLike<V | N> | N | undefined): SqlCondition;
|
|
191
191
|
ne(value: V | ExprLike<V | N> | N | undefined): SqlCondition;
|
|
@@ -233,7 +233,7 @@ interface PrimitiveColumn<V, N extends null | never, Src extends string = string
|
|
|
233
233
|
*/
|
|
234
234
|
raw(exp: string, bindings: readonly any[] | undefined): SqlCondition;
|
|
235
235
|
}
|
|
236
|
-
interface EntityColumn<T, N extends null | never = never, Src extends string = string, Key extends string = string> extends Expr<IdOf<T> | N, Src> {
|
|
236
|
+
export interface EntityColumn<T, N extends null | never = never, Src extends string = string, Key extends string = string> extends Expr<IdOf<T> | N, Src> {
|
|
237
237
|
readonly [selectKeyBrand]: Key;
|
|
238
238
|
/** Produces the tagged ID as SQL text, preserving NULL and the column's source. */
|
|
239
239
|
taggedId(): Expr<string | N, Src>;
|
|
@@ -250,27 +250,27 @@ interface EntityColumn<T, N extends null | never = never, Src extends string = s
|
|
|
250
250
|
lte(value: IdOf<T> | ExprLike<IdOf<T> | null> | null | undefined): SqlCondition;
|
|
251
251
|
raw(exp: string, bindings: readonly any[] | undefined): SqlCondition;
|
|
252
252
|
}
|
|
253
|
-
declare const tableMgmt: unique symbol;
|
|
254
|
-
declare const inQueryCondition: unique symbol;
|
|
253
|
+
export declare const tableMgmt: unique symbol;
|
|
254
|
+
export declare const inQueryCondition: unique symbol;
|
|
255
255
|
/** Defers a direct IN query literal to query.ts, which owns query pruning and SQL generation. */
|
|
256
|
-
interface InQueryCondition {
|
|
256
|
+
export interface InQueryCondition {
|
|
257
257
|
readonly [inQueryCondition]: {
|
|
258
258
|
column: BaseExpr;
|
|
259
259
|
query: object;
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
declare function getTableMgmt<T extends Entity>(table: TableFor<T>): TableMgmt;
|
|
263
|
-
declare function getTableMgmt(table: CustomTableFor): CustomTableMgmt;
|
|
264
|
-
declare function getTableMgmt(table: TableFor<Entity> | CustomTableFor): TableSourceMgmt;
|
|
262
|
+
export declare function getTableMgmt<T extends Entity>(table: TableFor<T>): TableMgmt;
|
|
263
|
+
export declare function getTableMgmt(table: CustomTableFor): CustomTableMgmt;
|
|
264
|
+
export declare function getTableMgmt(table: TableFor<Entity> | CustomTableFor): TableSourceMgmt;
|
|
265
265
|
/** The identity SQL queries bind a table by, plus its original entity metadata. */
|
|
266
|
-
interface TableSourceMgmt {
|
|
266
|
+
export interface TableSourceMgmt {
|
|
267
267
|
tableName: string;
|
|
268
268
|
schema?: string;
|
|
269
269
|
}
|
|
270
270
|
/** Qualifies custom tables without changing SQL for tables on the default search path. */
|
|
271
|
-
declare function tableSqlName(table: TableSourceMgmt): string;
|
|
271
|
+
export declare function tableSqlName(table: TableSourceMgmt): string;
|
|
272
272
|
/** The identity and generated metadata of a modeled entity table. */
|
|
273
|
-
interface TableMgmt extends TableSourceMgmt {
|
|
273
|
+
export interface TableMgmt extends TableSourceMgmt {
|
|
274
274
|
/**
|
|
275
275
|
* The metadata this table was created with, i.e. `table(TaskNew)` keeps `taskNewMeta`.
|
|
276
276
|
*
|
|
@@ -281,27 +281,27 @@ interface TableMgmt extends TableSourceMgmt {
|
|
|
281
281
|
meta: EntityMetadata;
|
|
282
282
|
}
|
|
283
283
|
/** Returns the metadata for the entity that `table` is bound to. */
|
|
284
|
-
declare function getTableMetadata<T extends Entity>(table: TableFor<T>): EntityMetadata<T>;
|
|
285
|
-
declare function newTableProxy<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
286
|
-
declare function isTable(obj: unknown): obj is Table<any, any> | CustomTableFor;
|
|
284
|
+
export declare function getTableMetadata<T extends Entity>(table: TableFor<T>): EntityMetadata<T>;
|
|
285
|
+
export declare function newTableProxy<T extends Entity>(cstr: MaybeAbstractEntityConstructor<T>): Table<T>;
|
|
286
|
+
export declare function isTable(obj: unknown): obj is Table<any, any> | CustomTableFor;
|
|
287
287
|
/** Whether a physical table has generated entity metadata. */
|
|
288
|
-
declare function isEntityTable(obj: unknown): obj is Table<any, any>;
|
|
288
|
+
export declare function isEntityTable(obj: unknown): obj is Table<any, any>;
|
|
289
289
|
/** Whether a physical table has columns declared through `declareTable`. */
|
|
290
|
-
declare function isCustomTable(obj: unknown): obj is CustomTableFor;
|
|
290
|
+
export declare function isCustomTable(obj: unknown): obj is CustomTableFor;
|
|
291
291
|
/**
|
|
292
292
|
* Marks a sugar join entry whose target is a *collection* (o2m/m2m), which filter soft-deletes like
|
|
293
293
|
* em.find's "collections filter out soft-deletes, but m2o/o2o references still return them"; see
|
|
294
294
|
* `QueryParser.addSoftDeleteCondition`'s call site. Reference joins and explicit joins are unmarked.
|
|
295
295
|
*/
|
|
296
|
-
declare const collectionJoin: unique symbol;
|
|
296
|
+
export declare const collectionJoin: unique symbol;
|
|
297
297
|
/** Marks a sugar m2m join entry (`a.tags.as(t)`) with its hidden join-table join; `parseQuery` expands it. */
|
|
298
|
-
declare const m2mJoinTable: unique symbol;
|
|
299
|
-
interface M2mJoinTable {
|
|
298
|
+
export declare const m2mJoinTable: unique symbol;
|
|
299
|
+
export interface M2mJoinTable {
|
|
300
300
|
handle: JoinTableHandle;
|
|
301
301
|
on: SqlCondition;
|
|
302
302
|
}
|
|
303
303
|
/** The runtime identity of an m2m join table in a query, i.e. `authors_to_tags`; it has no entity. */
|
|
304
|
-
declare class JoinTableHandle {
|
|
304
|
+
export declare class JoinTableHandle {
|
|
305
305
|
readonly joinTableName: string;
|
|
306
306
|
constructor(joinTableName: string);
|
|
307
307
|
}
|
|
@@ -310,13 +310,13 @@ declare class JoinTableHandle {
|
|
|
310
310
|
* I.e. Author.firstName uses the first_name column but resolves its alias in each query scope.
|
|
311
311
|
* Collections, polymorphic references, and inherited nonlocal fields require explicit expressions.
|
|
312
312
|
*/
|
|
313
|
-
declare function tableWhere(mgmt: TableMgmt, filter: object): SqlCondition;
|
|
313
|
+
export declare function tableWhere(mgmt: TableMgmt, filter: object): SqlCondition;
|
|
314
314
|
/**
|
|
315
315
|
* Converts relationship filters into conditions on the joined table's id column.
|
|
316
316
|
* I.e. Author's `join: { books: "b:1" }` filters Book.id to 1; `{ books: book }` uses book.id.
|
|
317
317
|
* Lists match any supplied ID, `true` requires a Book, and `null` or `false` requires no Book.
|
|
318
318
|
*/
|
|
319
|
-
declare function tableEntityWhere(mgmt: TableMgmt, value: unknown): SqlCondition;
|
|
319
|
+
export declare function tableEntityWhere(mgmt: TableMgmt, value: unknown): SqlCondition;
|
|
320
320
|
//#endregion
|
|
321
|
-
export {
|
|
321
|
+
export {};
|
|
322
322
|
//# sourceMappingURL=Tables.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tables.d.mts","names":[],"sources":["../../../src/queries/sql/Tables.ts"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Tables.d.mts","names":[],"sources":["../../../src/queries/sql/Tables.ts"],"mappings":";;;;;;;;;;wBAyDgB,MAAM,UAAU,QAAQ,MAAM,+BAA+B,KAAK,MAAM;;wBAExE,MAAM,0BAA0B,UAAU,oBACxD,YAAY,sBAAsB,WAAW,KAC5C,YAAY,GAAG;;;;;;;wBAOF,MAAM,UAAU,QAAQ,qBACtC,MAAM,+BAA+B,IACrC,MAAM,OACL,MAAM,GAAG;;wBAEI,MAAM,UAAU,oBAAoB,0BAA0B,qBAC5E,YAAY,sBAAsB,WAAW,IAC7C,MAAM,OACL,YAAY,GAAG;;wBAUF,OAAO,mBAAmB,0CACrC,MAAM,OACL,WAAW,IAAI,EAAE,WAAW,qCAAqC,UAAU,UAAU,MAAM;;;;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gCAAgC;EAC3F,GAAG,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EAClE,IAAI,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EACnE,GAAG,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EAClE,IAAI,OAAO,KAAK,KAAK,SAAS,KAAK,gCAAgC;EACnE,IAAI,aAAa,uCAAuC;;qBAG7C;qBACA;;iBAGI;YACL;IAAqB,QAAQ;IAAU;;;wBAGnC,aAAa,UAAU,QAAQ,OAAO,SAAS,KAAK;wBACpD,aAAa,OAAO,iBAAiB;wBACrC,aAAa,OAAO,SAAS,UAAU,iBAAiB;;iBAMvD;EACf;EACA;;;wBAIc,aAAa,OAAO;;iBAKnB,kBAAkB;;;;;;;;EAQjC,MAAM;;;wBAIQ,iBAAiB,UAAU,QAAQ,OAAO,SAAS,KAAK,eAAe;wBAKvE,cAAc,UAAU,QAAQ,MAAM,+BAA+B,KAAK,MAAM;wBA0FhF,QAAQ,eAAe,OAAO,kBAAkB;;wBAKhD,cAAc,eAAe,OAAO;;wBAKpC,cAAc,eAAe,OAAO;;;;;;qBA+bvC;;qBAGA;iBAEI;EACf,QAAQ;EACR,IAAI;;;qBAIO;WACU;EAArB,YAAqB;;;;;;;wBA8LP,WAAW,MAAM,WAAW,iBAAiB;;;;;;wBAwD7C,iBAAiB,MAAM,WAAW,iBAAiB"}
|
|
@@ -4,10 +4,10 @@ import { Expr } from "./Expr.cjs";
|
|
|
4
4
|
//#region src/queries/sql/custom.d.ts
|
|
5
5
|
declare const declaredTableDefinition: unique symbol;
|
|
6
6
|
/** Built-in storage types supported by concise custom-table declarations. */
|
|
7
|
-
type CustomColumnType = "boolean" | "int" | "float" | "bigint" | "text" | "uuid" | "date" | "timestamp" | "timestamptz" | "json" | "jsonb";
|
|
7
|
+
export type CustomColumnType = "boolean" | "int" | "float" | "bigint" | "text" | "uuid" | "date" | "timestamp" | "timestamptz" | "json" | "jsonb";
|
|
8
8
|
type CustomArrayType = "boolean" | "int" | "float" | "bigint" | "text" | "uuid";
|
|
9
9
|
/** Expanded custom-column declaration for physical names, SQL nullability, defaults, and generated storage. */
|
|
10
|
-
type CustomColumnConfig = {
|
|
10
|
+
export type CustomColumnConfig = {
|
|
11
11
|
type: CustomColumnType;
|
|
12
12
|
columnName?: string;
|
|
13
13
|
nullable?: boolean;
|
|
@@ -22,41 +22,41 @@ type CustomColumnConfig = {
|
|
|
22
22
|
generated?: boolean;
|
|
23
23
|
array: true;
|
|
24
24
|
};
|
|
25
|
-
type CustomColumnInput = CustomColumnType | CustomColumnConfig;
|
|
26
|
-
type CustomColumnInputs = Readonly<Record<string, CustomColumnInput>>;
|
|
25
|
+
export type CustomColumnInput = CustomColumnType | CustomColumnConfig;
|
|
26
|
+
export type CustomColumnInputs = Readonly<Record<string, CustomColumnInput>>;
|
|
27
27
|
/** A reusable declaration created by `declareTable`; call `table(definition)` to create a query handle. */
|
|
28
|
-
interface CustomTableDefinition<TableName extends string, C extends CustomColumnInputs> {
|
|
28
|
+
export interface CustomTableDefinition<TableName extends string, C extends CustomColumnInputs> {
|
|
29
29
|
readonly [declaredTableDefinition]: CustomTableDefinitionBrand<TableName, C>;
|
|
30
30
|
}
|
|
31
31
|
/** A custom physical table with declared primitive columns but no entity or relationship metadata. */
|
|
32
|
-
type CustomTable<C extends CustomColumnInputs, Name extends string = string> = {
|
|
32
|
+
export type CustomTable<C extends CustomColumnInputs, Name extends string = string> = {
|
|
33
33
|
readonly [tableMgmt]: CustomTableBrand<C, Name>;
|
|
34
34
|
} & { readonly [K in keyof C & string]: PrimitiveColumn<CustomColumnValue<C[K]>, CustomColumnNull<C[K]>, Name, K>; } & ("column" extends keyof C ? {} : {
|
|
35
35
|
/** References a one-off physical column not included in the custom-table declaration. */
|
|
36
36
|
column<R = unknown>(column: string): Expr<R, Name>;
|
|
37
37
|
});
|
|
38
38
|
/** A schema-erased custom-table handle for APIs that inspect table identity rather than declared columns. */
|
|
39
|
-
type CustomTableFor = {
|
|
39
|
+
export type CustomTableFor = {
|
|
40
40
|
readonly [tableMgmt]: CustomTableSourceBrand<string>;
|
|
41
41
|
};
|
|
42
42
|
/** Recovers a custom table handle's declaration for mutation input checking. */
|
|
43
|
-
type CustomColumnsOf<T> = T extends {
|
|
43
|
+
export type CustomColumnsOf<T> = T extends {
|
|
44
44
|
readonly [tableMgmt]: CustomTableBrand<infer C, string>;
|
|
45
45
|
} ? C : never;
|
|
46
46
|
/** The declared domain value, before SQL nullability is applied. */
|
|
47
|
-
type CustomColumnValue<I> = CustomColumnBaseValue<CustomColumnTypeOf<I>> extends (infer V) ? (CustomColumnArray<I> extends true ? V[] : V) : never;
|
|
47
|
+
export type CustomColumnValue<I> = CustomColumnBaseValue<CustomColumnTypeOf<I>> extends (infer V) ? (CustomColumnArray<I> extends true ? V[] : V) : never;
|
|
48
48
|
/** Runtime custom-table identity and its normalized physical columns. */
|
|
49
|
-
interface CustomTableMgmt extends TableSourceMgmt {
|
|
49
|
+
export interface CustomTableMgmt extends TableSourceMgmt {
|
|
50
50
|
columns: ColumnDescriptors;
|
|
51
51
|
}
|
|
52
52
|
/** Declares a physical table that Joist codegen intentionally does not model as an entity. */
|
|
53
|
-
declare function declareTable<const TableName extends string, const C extends CustomColumnInputs>(tableName: TableName, columns: C, options?: {
|
|
53
|
+
export declare function declareTable<const TableName extends string, const C extends CustomColumnInputs>(tableName: TableName, columns: C, options?: {
|
|
54
54
|
schema?: string;
|
|
55
55
|
}): CustomTableDefinition<TableName, C>;
|
|
56
56
|
/** Recognizes a declaration created by `declareTable`. */
|
|
57
|
-
declare function isCustomTableDefinition(value: unknown): value is CustomTableDefinition<string, CustomColumnInputs>;
|
|
57
|
+
export declare function isCustomTableDefinition(value: unknown): value is CustomTableDefinition<string, CustomColumnInputs>;
|
|
58
58
|
/** Returns the normalized table name and columns stored in a custom-table declaration. */
|
|
59
|
-
declare function getCustomTableDefinition<TableName extends string, C extends CustomColumnInputs>(definition: CustomTableDefinition<TableName, C>): CustomTableDefinitionBrand<TableName, C>;
|
|
59
|
+
export declare function getCustomTableDefinition<TableName extends string, C extends CustomColumnInputs>(definition: CustomTableDefinition<TableName, C>): CustomTableDefinitionBrand<TableName, C>;
|
|
60
60
|
interface CustomTableDefinitionBrand<TableName extends string, C extends CustomColumnInputs> {
|
|
61
61
|
readonly tableName: TableName;
|
|
62
62
|
readonly schema?: string;
|
|
@@ -81,5 +81,5 @@ type CustomColumnNull<I> = I extends {
|
|
|
81
81
|
/** Maps a custom column's SQL storage type to its TypeScript scalar value. */
|
|
82
82
|
type CustomColumnBaseValue<T> = T extends "boolean" ? boolean : T extends "int" | "float" ? number : T extends "bigint" ? bigint : T extends "text" | "uuid" ? string : T extends "date" | "timestamp" | "timestamptz" ? Date : T extends "json" | "jsonb" ? unknown : never;
|
|
83
83
|
//#endregion
|
|
84
|
-
export {
|
|
84
|
+
export {};
|
|
85
85
|
//# sourceMappingURL=custom.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom.d.cts","names":[],"sources":["../../../src/queries/sql/custom.ts"],"mappings":";;;;cAKM;;
|
|
1
|
+
{"version":3,"file":"custom.d.cts","names":[],"sources":["../../../src/queries/sql/custom.ts"],"mappings":";;;;cAKM;;YAGM;KAaP;;YAGO;EAEN,MAAM;EACN;EACA;EACA;EACA;EACA;;EAGA,MAAM;EACN;EACA;EACA;EACA;EACA;;YAGM,oBAAoB,mBAAmB;YACvC,qBAAqB,SAAS,eAAe;;iBAGxC,sBAAsB,0BAA0B,UAAU;YAC/D,0BAA0B,2BAA2B,WAAW;;;YAIhE,YAAY,UAAU,oBAAoB;YAC1C,YAAY,iBAAiB,GAAG;gBAEhC,WAAW,aAAa,gBAAgB,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,KAAK,MAAM,gCAC/E;;EAIpB,OAAO,aAAa,iBAAiB,KAAK,GAAG;;;YAIzC;YAA6B,YAAY;;;YAGzC,gBAAgB,KAAK;YAAsB,YAAY,uBAAuB;IAA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