@azure/cosmos 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/common/constants.d.ts.map +1 -1
- package/dist/browser/common/constants.js +16 -1
- package/dist/browser/common/constants.js.map +1 -1
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.js +84 -0
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.js +39 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.js +4 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +174 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +28 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +129 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +66 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.js +23 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/browser/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/browser/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.js +55 -0
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js +156 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.js +105 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.js +93 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.js +65 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/browser/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/documentProducer.js +17 -4
- package/dist/browser/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/index.d.ts +7 -0
- package/dist/browser/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/index.js +4 -0
- package/dist/browser/queryExecutionContext/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/browser/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/browser/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/browser/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/orderByComparator.js +20 -3
- package/dist/browser/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/browser/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/parallelQueryResult.js +23 -0
- package/dist/browser/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +4 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +310 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +102 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +180 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +93 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +4 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +53 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +34 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +4 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.js +4 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/browser/queryIterator.js.map +1 -1
- package/dist/browser/utils/offers.d.ts.map +1 -1
- package/dist/browser/utils/offers.js +0 -1
- package/dist/browser/utils/offers.js.map +1 -1
- package/dist/commonjs/common/constants.d.ts.map +1 -1
- package/dist/commonjs/common/constants.js +13 -2
- package/dist/commonjs/common/constants.js.map +1 -1
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js +93 -0
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js +44 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js +5 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +178 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +31 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +133 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +70 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js +26 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js +59 -0
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js +160 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js +109 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js +97 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js +69 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/commonjs/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/documentProducer.js +17 -4
- package/dist/commonjs/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/index.d.ts +7 -0
- package/dist/commonjs/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/index.js +10 -0
- package/dist/commonjs/queryExecutionContext/index.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/commonjs/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByComparator.js +21 -3
- package/dist/commonjs/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js +26 -0
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +314 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +106 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +184 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +97 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +57 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +38 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/commonjs/queryIterator.js.map +1 -1
- package/dist/commonjs/utils/offers.d.ts.map +1 -1
- package/dist/commonjs/utils/offers.js +0 -1
- package/dist/commonjs/utils/offers.js.map +1 -1
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +16 -1
- package/dist/esm/common/constants.js.map +1 -1
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.js +84 -0
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.js +39 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.js +4 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +174 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +28 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +129 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +66 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.js +23 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.js +55 -0
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js +156 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.js +105 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.js +93 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.js +65 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/esm/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/documentProducer.js +17 -4
- package/dist/esm/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/index.d.ts +7 -0
- package/dist/esm/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/index.js +4 -0
- package/dist/esm/queryExecutionContext/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/esm/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/esm/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/esm/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/orderByComparator.js +20 -3
- package/dist/esm/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/esm/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/parallelQueryResult.js +23 -0
- package/dist/esm/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +4 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +310 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +102 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +180 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +93 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +4 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +53 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +34 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +4 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.js +4 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/esm/queryIterator.js.map +1 -1
- package/dist/esm/utils/offers.d.ts.map +1 -1
- package/dist/esm/utils/offers.js +0 -1
- package/dist/esm/utils/offers.js.map +1 -1
- package/dist/react-native/common/constants.d.ts.map +1 -1
- package/dist/react-native/common/constants.js +16 -1
- package/dist/react-native/common/constants.js.map +1 -1
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.js +84 -0
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.js +39 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.js +4 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +174 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +28 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +129 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +66 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.js +23 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/react-native/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/react-native/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.js +55 -0
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js +156 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.js +105 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.js +93 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.js +65 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/react-native/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/documentProducer.js +17 -4
- package/dist/react-native/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/index.d.ts +7 -0
- package/dist/react-native/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/index.js +4 -0
- package/dist/react-native/queryExecutionContext/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/react-native/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/react-native/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByComparator.js +20 -3
- package/dist/react-native/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/react-native/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/parallelQueryResult.js +23 -0
- package/dist/react-native/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +4 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +310 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +102 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +180 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +93 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +4 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +53 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +34 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +4 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.js +4 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/react-native/queryIterator.js.map +1 -1
- package/dist/react-native/utils/offers.d.ts.map +1 -1
- package/dist/react-native/utils/offers.js +0 -1
- package/dist/react-native/utils/offers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallelQueryExecutionContextBase.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryExecutionContextBase.ts"],"names":[],"mappings":";;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,8EAA4C;AAC5C,kEAAkC;AAGlC,0CAAmD;AACnD,6DAAuE;AAGvE,4DAAsD;AACtD,sFAAgF;AAEhF,+DAAyD;AAEzD,qDAAkE;AAElE,wFAGkD;AAElD,cAAc;AACd,MAAM,MAAM,GAAgB,IAAA,2BAAkB,EAAC,mCAAmC,CAAC,CAAC;AAEpF,cAAc;AACd,IAAY,uCAIX;AAJD,WAAY,uCAAuC;IACjD,8DAAmB,CAAA;IACnB,oEAAyB,CAAA;IACzB,0DAAe,CAAA;AACjB,CAAC,EAJW,uCAAuC,uDAAvC,uCAAuC,QAIlD;AAED,cAAc;AACd,MAAsB,iCAAiC;IA+B3C;IACA;IACA;IACA;IACA;IACA;IAnCF,GAAG,CAAM;IACT,KAAK,CAAM;IACX,MAAM,CAAC,MAAM,GAAG,uCAAuC,CAAC;IACxD,eAAe,CAA0B;IACvC,UAAU,CAAM;IAClB,mBAA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;YAC5D,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,iCAAiC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpE,IAAI,CAAC,KAAK,GAAG,iCAAiC,CAAC,MAAM,CAAC,UAAU,CAAC;QACnE,CAAC;QAED,MAAM,oBAAoB,GACxB,IAAI,CAAC,8BAA8B,CAAC,IAAI,EAAE,KAAK,CAAC;YAChD,IAAI,CAAC,8BAA8B,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEnD,IAAI,oBAAoB,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,GAAG,iCAAiC,CAAC,MAAM,CAAC,KAAK,CAAC;QAC9D,CAAC;IACH,CAAC;;AA5gBH,8EA6gBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport PriorityQueue from \"priorityqueuejs\";\nimport semaphore from \"semaphore\";\nimport type { ClientContext } from \"../ClientContext.js\";\nimport type { AzureLogger } from \"@azure/logger\";\nimport { createClientLogger } from \"@azure/logger\";\nimport { StatusCodes, SubStatusCodes } from \"../common/statusCodes.js\";\nimport type { FeedOptions, Response } from \"../request/index.js\";\nimport type { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse.js\";\nimport { QueryRange } from \"../routing/QueryRange.js\";\nimport { SmartRoutingMapProvider } from \"../routing/smartRoutingMapProvider.js\";\nimport type { CosmosHeaders } from \"./CosmosHeaders.js\";\nimport { DocumentProducer } from \"./documentProducer.js\";\nimport type { ExecutionContext } from \"./ExecutionContext.js\";\nimport { getInitialHeader, mergeHeaders } from \"./headerUtils.js\";\nimport type { SqlQuerySpec } from \"./SqlQuerySpec.js\";\nimport {\n DiagnosticNodeInternal,\n DiagnosticNodeType,\n} from \"../diagnostics/DiagnosticNodeInternal.js\";\n\n/** @hidden */\nconst logger: AzureLogger = createClientLogger(\"parallelQueryExecutionContextBase\");\n\n/** @hidden */\nexport enum ParallelQueryExecutionContextBaseStates {\n started = \"started\",\n inProgress = \"inProgress\",\n ended = \"ended\",\n}\n\n/** @hidden */\nexport abstract class ParallelQueryExecutionContextBase implements ExecutionContext {\n private err: any;\n private state: any;\n private static STATES = ParallelQueryExecutionContextBaseStates;\n private routingProvider: SmartRoutingMapProvider;\n protected sortOrders: any;\n private requestContinuation: any;\n private respHeaders: CosmosHeaders;\n private unfilledDocumentProducersQueue: PriorityQueue<DocumentProducer>;\n private bufferedDocumentProducersQueue: PriorityQueue<DocumentProducer>;\n // TODO: update type of buffer from any --> generic can be used here\n private buffer: any[];\n private sem: any;\n private diagnosticNodeWrapper: {\n consumed: boolean;\n diagnosticNode: DiagnosticNodeInternal;\n };\n /**\n * Provides the ParallelQueryExecutionContextBase.\n * This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from.\n *\n * When handling a parallelized query, it instantiates one instance of\n * DocumentProcuder per target partition key range and aggregates the result of each.\n *\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - The Collection Link\n * @param options - Represents the feed options.\n * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo\n * @hidden\n */\n constructor(\n private clientContext: ClientContext,\n private collectionLink: string,\n private query: string | SqlQuerySpec,\n private options: FeedOptions,\n private partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo,\n private correlatedActivityId: string,\n ) {\n this.clientContext = clientContext;\n this.collectionLink = collectionLink;\n this.query = query;\n this.options = options;\n this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;\n this.correlatedActivityId = correlatedActivityId;\n this.diagnosticNodeWrapper = {\n consumed: false,\n diagnosticNode: new DiagnosticNodeInternal(\n clientContext.diagnosticLevel,\n DiagnosticNodeType.PARALLEL_QUERY_NODE,\n null,\n ),\n };\n this.diagnosticNodeWrapper.diagnosticNode.addData({ stateful: true });\n this.err = undefined;\n this.state = ParallelQueryExecutionContextBase.STATES.started;\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n this.sortOrders = this.partitionedQueryExecutionInfo.queryInfo.orderBy;\n this.buffer = [];\n\n this.requestContinuation = options ? options.continuationToken || options.continuation : null;\n // response headers of undergoing operation\n this.respHeaders = getInitialHeader();\n // Make priority queue for documentProducers\n this.unfilledDocumentProducersQueue = new PriorityQueue<DocumentProducer>(\n (a: DocumentProducer, b: DocumentProducer) => a.generation - b.generation,\n );\n // The comparator is supplied by the derived class\n this.bufferedDocumentProducersQueue = new PriorityQueue<DocumentProducer>(\n (a: DocumentProducer, b: DocumentProducer) => this.documentProducerComparator(b, a),\n );\n // Creating the documentProducers\n this.sem = semaphore(1);\n const createDocumentProducersAndFillUpPriorityQueueFunc = async (): Promise<void> => {\n // ensure the lock is released after finishing up\n try {\n const targetPartitionRanges = await this._onTargetPartitionRanges();\n\n const maxDegreeOfParallelism =\n options.maxDegreeOfParallelism === undefined || options.maxDegreeOfParallelism < 1\n ? targetPartitionRanges.length\n : Math.min(options.maxDegreeOfParallelism, targetPartitionRanges.length);\n\n logger.info(\n \"Query starting against \" +\n targetPartitionRanges.length +\n \" ranges with parallelism of \" +\n maxDegreeOfParallelism,\n );\n\n let filteredPartitionKeyRanges = [];\n // The document producers generated from filteredPartitionKeyRanges\n const targetPartitionQueryExecutionContextList: DocumentProducer[] = [];\n\n if (this.requestContinuation) {\n throw new Error(\"Continuation tokens are not yet supported for cross partition queries\");\n } else {\n filteredPartitionKeyRanges = targetPartitionRanges;\n }\n // Create one documentProducer for each partitionTargetRange\n filteredPartitionKeyRanges.forEach((partitionTargetRange: any) => {\n // TODO: any partitionTargetRange\n // no async callback\n targetPartitionQueryExecutionContextList.push(\n this._createTargetPartitionQueryExecutionContext(partitionTargetRange, undefined),\n );\n });\n\n // Fill up our priority queue with documentProducers\n targetPartitionQueryExecutionContextList.forEach((documentProducer): void => {\n // has async callback\n try {\n this.unfilledDocumentProducersQueue.enq(documentProducer);\n } catch (e: any) {\n this.err = e;\n }\n });\n\n this.sem.leave();\n } catch (err: any) {\n this.err = err;\n // release the lock\n this.sem.leave();\n return;\n }\n };\n this.sem.take(createDocumentProducersAndFillUpPriorityQueueFunc);\n }\n\n protected abstract documentProducerComparator(\n dp1: DocumentProducer,\n dp2: DocumentProducer,\n ): number;\n\n private _mergeWithActiveResponseHeaders(headers: CosmosHeaders): void {\n mergeHeaders(this.respHeaders, headers);\n }\n\n private _getAndResetActiveResponseHeaders(): CosmosHeaders {\n const ret = this.respHeaders;\n this.respHeaders = getInitialHeader();\n return ret;\n }\n\n private getDiagnosticNode(): DiagnosticNodeInternal {\n return this.diagnosticNodeWrapper.diagnosticNode;\n }\n\n private async _onTargetPartitionRanges(): Promise<any[]> {\n // invokes the callback when the target partition ranges are ready\n const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges;\n const queryRanges = parsedRanges.map((item) => QueryRange.parseFromDict(item));\n return this.routingProvider.getOverlappingRanges(\n this.collectionLink,\n queryRanges,\n this.getDiagnosticNode(),\n );\n }\n\n /**\n * Gets the replacement ranges for a partitionkeyrange that has been split\n */\n private async _getReplacementPartitionKeyRanges(\n documentProducer: DocumentProducer,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<any[]> {\n const partitionKeyRange = documentProducer.targetPartitionKeyRange;\n // Download the new routing map\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n // Get the queryRange that relates to this partitionKeyRange\n const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange);\n return this.routingProvider.getOverlappingRanges(\n this.collectionLink,\n [queryRange],\n diagnosticNode,\n );\n }\n\n private async _enqueueReplacementDocumentProducers(\n error: any,\n diagnosticNode: DiagnosticNodeInternal,\n documentProducer: DocumentProducer,\n ): Promise<void> {\n // Get the replacement ranges\n const replacementPartitionKeyRanges = await this._getReplacementPartitionKeyRanges(\n documentProducer,\n diagnosticNode,\n );\n\n if (replacementPartitionKeyRanges.length === 0) {\n throw error;\n } else if (replacementPartitionKeyRanges.length === 1) {\n // Partition is gone due to Merge\n // Create the replacement documentProducer with populateEpkRangeHeaders Flag set to true to set startEpk and endEpk headers\n const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(\n replacementPartitionKeyRanges[0],\n documentProducer.continuationToken,\n documentProducer.startEpk,\n documentProducer.endEpk,\n true,\n );\n\n this.unfilledDocumentProducersQueue.enq(replacementDocumentProducer);\n } else {\n // Create the replacement documentProducers\n const replacementDocumentProducers: DocumentProducer[] = [];\n replacementPartitionKeyRanges.forEach((partitionKeyRange) => {\n const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange);\n // Create replacment document producers with the parent's continuationToken\n const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(\n partitionKeyRange,\n documentProducer.continuationToken,\n queryRange.min,\n queryRange.max,\n false,\n );\n replacementDocumentProducers.push(replacementDocumentProducer);\n });\n\n // add document producers to the queue\n replacementDocumentProducers.forEach((replacementDocumentProducer) => {\n if (replacementDocumentProducer.hasMoreResults()) {\n this.unfilledDocumentProducersQueue.enq(replacementDocumentProducer);\n }\n });\n }\n }\n\n private static _needPartitionKeyRangeCacheRefresh(error: any): boolean {\n // TODO: any error\n return (\n error.code === StatusCodes.Gone &&\n \"substatus\" in error &&\n error[\"substatus\"] === SubStatusCodes.PartitionKeyRangeGone\n );\n }\n\n /**\n * Determine if there are still remaining resources to processs based on the value of the continuation\n * token or the elements remaining on the current batch in the QueryIterator.\n * @returns true if there is other elements to process in the ParallelQueryExecutionContextBase.\n */\n public hasMoreResults(): boolean {\n return (\n !this.err &&\n (this.buffer.length > 0 || this.state !== ParallelQueryExecutionContextBase.STATES.ended)\n );\n }\n\n /**\n * Creates target partition range Query Execution Context\n */\n private _createTargetPartitionQueryExecutionContext(\n partitionKeyTargetRange: any,\n continuationToken?: any,\n startEpk?: string,\n endEpk?: string,\n populateEpkRangeHeaders?: boolean,\n ): DocumentProducer {\n let rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery;\n let sqlQuerySpec: SqlQuerySpec;\n const query = this.query;\n if (typeof query === \"string\") {\n sqlQuerySpec = { query };\n } else {\n sqlQuerySpec = query;\n }\n\n const formatPlaceHolder = \"{documentdb-formattableorderbyquery-filter}\";\n if (rewrittenQuery) {\n sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec));\n // We hardcode the formattable filter to true for now\n rewrittenQuery = rewrittenQuery.replace(formatPlaceHolder, \"true\");\n sqlQuerySpec[\"query\"] = rewrittenQuery;\n }\n\n const options = { ...this.options };\n options.continuationToken = continuationToken;\n\n return new DocumentProducer(\n this.clientContext,\n this.collectionLink,\n sqlQuerySpec,\n partitionKeyTargetRange,\n options,\n this.correlatedActivityId,\n startEpk,\n endEpk,\n populateEpkRangeHeaders,\n );\n }\n protected async drainBufferedItems(): Promise<Response<any>> {\n return new Promise<Response<any>>((resolve, reject) => {\n this.sem.take(() => {\n if (this.err) {\n // if there is a prior error return error\n this.sem.leave();\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n // return undefined if there is no more results\n if (this.buffer.length === 0) {\n this.sem.leave();\n return resolve({\n result: this.state === ParallelQueryExecutionContextBase.STATES.ended ? undefined : [],\n headers: this._getAndResetActiveResponseHeaders(),\n });\n }\n // draing the entire buffer object and return that in result of return object\n const bufferedResults = this.buffer;\n this.buffer = [];\n\n // release the lock before returning\n this.sem.leave();\n // invoke the callback on the item\n return resolve({\n result: bufferedResults,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n });\n });\n }\n\n /**\n * Buffers document producers based on the maximum degree of parallelism.\n * Moves document producers from the unfilled queue to the buffered queue.\n * @param diagnosticNode - The diagnostic node for logging and tracing.\n * @returns A promise that resolves when buffering is complete.\n */\n protected async bufferDocumentProducers(diagnosticNode?: DiagnosticNodeInternal): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n this.sem.take(async () => {\n if (this.err) {\n this.sem.leave();\n reject(this.err);\n return;\n }\n this.updateStates(this.err);\n\n if (this.state === ParallelQueryExecutionContextBase.STATES.ended) {\n this.sem.leave();\n resolve();\n return;\n }\n\n if (this.unfilledDocumentProducersQueue.size() === 0) {\n this.sem.leave();\n resolve();\n return;\n }\n\n try {\n const maxDegreeOfParallelism =\n this.options.maxDegreeOfParallelism === undefined ||\n this.options.maxDegreeOfParallelism < 1\n ? this.unfilledDocumentProducersQueue.size()\n : Math.min(\n this.options.maxDegreeOfParallelism,\n this.unfilledDocumentProducersQueue.size(),\n );\n\n const documentProducers: DocumentProducer[] = [];\n while (\n documentProducers.length < maxDegreeOfParallelism &&\n this.unfilledDocumentProducersQueue.size() > 0\n ) {\n let documentProducer: DocumentProducer;\n try {\n documentProducer = this.unfilledDocumentProducersQueue.deq();\n } catch (e: any) {\n this.err = e;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n documentProducers.push(documentProducer);\n }\n\n const bufferDocumentProducer = async (\n documentProducer: DocumentProducer,\n ): Promise<void> => {\n try {\n const headers = await documentProducer.bufferMore(diagnosticNode);\n this._mergeWithActiveResponseHeaders(headers);\n // if buffer of document producer is filled, add it to the buffered document producers queue\n const nextItem = documentProducer.peakNextItem();\n if (nextItem !== undefined) {\n this.bufferedDocumentProducersQueue.enq(documentProducer);\n } else if (documentProducer.hasMoreResults()) {\n this.unfilledDocumentProducersQueue.enq(documentProducer);\n }\n } catch (err) {\n if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {\n // We want the document producer enqueued\n // So that later parts of the code can repair the execution context\n // refresh the partition key ranges and ctreate new document producers and add it to the queue\n await this._enqueueReplacementDocumentProducers(\n err,\n diagnosticNode,\n documentProducer,\n );\n resolve();\n } else {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(err);\n }\n }\n };\n\n try {\n await Promise.all(\n documentProducers.map((producer) => bufferDocumentProducer(producer)),\n );\n } catch (err) {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(err);\n return;\n }\n resolve();\n } catch (err) {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(err);\n } finally {\n this.sem.leave();\n }\n });\n });\n }\n /**\n * Drains the buffer of filled document producers and appends their items to the main buffer.\n * @param isOrderBy - Indicates if the query is an order by query.\n * @returns A promise that resolves when the buffer is filled.\n */\n protected async fillBufferFromBufferQueue(isOrderBy: boolean = false): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n this.sem.take(async () => {\n if (this.err) {\n // if there is a prior error return error\n this.sem.leave();\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n if (\n this.state === ParallelQueryExecutionContextBase.STATES.ended ||\n this.bufferedDocumentProducersQueue.size() === 0\n ) {\n this.sem.leave();\n resolve();\n return;\n }\n\n try {\n if (isOrderBy) {\n while (\n this.unfilledDocumentProducersQueue.isEmpty() &&\n this.bufferedDocumentProducersQueue.size() > 0\n ) {\n const documentProducer = this.bufferedDocumentProducersQueue.deq();\n const { result, headers } = await documentProducer.fetchNextItem();\n this._mergeWithActiveResponseHeaders(headers);\n if (result) {\n this.buffer.push(result);\n }\n if (documentProducer.peakNextItem() !== undefined) {\n this.bufferedDocumentProducersQueue.enq(documentProducer);\n } else if (documentProducer.hasMoreResults()) {\n this.unfilledDocumentProducersQueue.enq(documentProducer);\n } else {\n // no more results in document producer\n }\n }\n } else {\n while (this.bufferedDocumentProducersQueue.size() > 0) {\n const documentProducer = this.bufferedDocumentProducersQueue.deq();\n const { result, headers } = await documentProducer.fetchBufferedItems();\n this._mergeWithActiveResponseHeaders(headers);\n if (result) {\n this.buffer.push(...result);\n }\n if (documentProducer.hasMoreResults()) {\n this.unfilledDocumentProducersQueue.enq(documentProducer);\n }\n }\n }\n this.updateStates(this.err);\n } catch (err) {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n } finally {\n // release the lock before returning\n this.sem.leave();\n }\n resolve();\n return;\n });\n });\n }\n\n private updateStates(error: any): void {\n if (error) {\n this.err = error;\n this.state = ParallelQueryExecutionContextBase.STATES.ended;\n return;\n }\n\n if (this.state === ParallelQueryExecutionContextBase.STATES.started) {\n this.state = ParallelQueryExecutionContextBase.STATES.inProgress;\n }\n\n const hasNoActiveProducers =\n this.unfilledDocumentProducersQueue.size() === 0 &&\n this.bufferedDocumentProducersQueue.size() === 0;\n\n if (hasNoActiveProducers) {\n this.state = ParallelQueryExecutionContextBase.STATES.ended;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"parallelQueryExecutionContextBase.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryExecutionContextBase.ts"],"names":[],"mappings":";;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,8EAA4C;AAC5C,kEAAkC;AAClC,6DAAuE;AAGvE,kEAA4D;AAC5D,4DAAsD;AACtD,sFAAgF;AAIhF,+DAAyD;AACzD,qDAAkE;AAElE,0FAAoF;AAGpF,wFAGkD;AAQlD,qEAAqE;AAMrE,cAAc;AACd,IAAY,uCAIX;AAJD,WAAY,uCAAuC;IACjD,8DAAmB,CAAA;IACnB,oEAAyB,CAAA;IACzB,0DAAe,CAAA;AACjB,CAAC,EAJW,uCAAuC,uDAAvC,uCAAuC,QAIlD;AAED,cAAc;AACd,MAAsB,iCAAiC;IAiClC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAxCX,GAAG,CAAM;IACT,KAAK,CAAM;IACX,MAAM,CAAU,MAAM,GAAG,uCAAuC,CAAC;IACjE,eAAe,CAA0B;IAChC,mBAAmB,CAAM;IAClC,WAAW,CAAgB;IAClB,8BAA8B,CAAkC;IAChE,8BAA8B,CAAkC;IACjF,oEAAoE;IAC5D,MAAM,CAAQ;IACd,qBAAqB,GAAmC,IAAI,GAAG,EAAE,CAAC;IAClE,YAAY,GAAW,CAAC,CAAC;IAChB,yBAAyB,GAAsC,IAAI,GAAG,EAAE,CAAC;IACzE,GAAG,CAAM;IACT,qBAAqB,CAGpC;IACF;;;;;;;;;;;;OAYG;IACH,YACmB,aAA4B,EAC5B,cAAsB,EACtB,KAA4B,EAC5B,OAAoB,EACpB,6BAA4D,EAC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C;oBACjB,OAAO;gBACT,CAAC;wBAAS,CAAC;oBACT,oCAAoC;oBACpC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;gBACnB,CAAC;gBACD,OAAO,EAAE,CAAC;gBACV,OAAO;YACT,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,YAAY,CAAC,KAAU;QAC7B,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,iCAAiC,CAAC,MAAM,CAAC,KAAK,CAAC;YAC5D,OAAO;QACT,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,KAAK,iCAAiC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpE,IAAI,CAAC,KAAK,GAAG,iCAAiC,CAAC,MAAM,CAAC,UAAU,CAAC;QACnE,CAAC;QAED,MAAM,oBAAoB,GACxB,IAAI,CAAC,8BAA8B,CAAC,IAAI,EAAE,KAAK,CAAC;YAChD,IAAI,CAAC,8BAA8B,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAEnD,IAAI,oBAAoB,EAAE,CAAC;YACzB,IAAI,CAAC,KAAK,GAAG,iCAAiC,CAAC,MAAM,CAAC,KAAK,CAAC;QAC9D,CAAC;IACH,CAAC;;AA7+BH,8EA8+BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport PriorityQueue from \"priorityqueuejs\";\nimport semaphore from \"semaphore\";\nimport { StatusCodes, SubStatusCodes } from \"../common/statusCodes.js\";\nimport type { FeedOptions, Response } from \"../request/index.js\";\nimport type { PartitionedQueryExecutionInfo } from \"../request/ErrorResponse.js\";\nimport { ErrorResponse } from \"../request/ErrorResponse.js\";\nimport { QueryRange } from \"../routing/QueryRange.js\";\nimport { SmartRoutingMapProvider } from \"../routing/smartRoutingMapProvider.js\";\nimport type { CosmosHeaders, PartitionKeyRange } from \"../index.js\";\nimport type { ExecutionContext } from \"./ExecutionContext.js\";\nimport type { SqlQuerySpec } from \"./SqlQuerySpec.js\";\nimport { DocumentProducer } from \"./documentProducer.js\";\nimport { getInitialHeader, mergeHeaders } from \"./headerUtils.js\";\nimport type { FilterContext, FilterStrategy } from \"./queryFilteringStrategy/FilterStrategy.js\";\nimport { RidSkipCountFilter } from \"./queryFilteringStrategy/RidSkipCountFilter.js\";\nimport { TargetPartitionRangeManager } from \"./queryFilteringStrategy/TargetPartitionRangeManager.js\";\nimport type { QueryProcessingStrategy } from \"./queryProcessingStrategy/QueryProcessingStrategy.js\";\nimport {\n DiagnosticNodeInternal,\n DiagnosticNodeType,\n} from \"../diagnostics/DiagnosticNodeInternal.js\";\nimport type { ClientContext } from \"../ClientContext.js\";\nimport type { QueryRangeMapping } from \"./queryRangeMapping.js\";\nimport type {\n QueryRangeWithContinuationToken,\n RangeBoundary,\n BaseContinuationToken,\n} from \"../documents/ContinuationToken/CompositeQueryContinuationToken.js\";\nimport { createParallelQueryResult } from \"./parallelQueryResult.js\";\nimport type {\n PartitionRangeUpdate,\n PartitionRangeUpdates,\n} from \"../documents/ContinuationToken/PartitionRangeUpdate.js\";\n\n/** @hidden */\nexport enum ParallelQueryExecutionContextBaseStates {\n started = \"started\",\n inProgress = \"inProgress\",\n ended = \"ended\",\n}\n\n/** @hidden */\nexport abstract class ParallelQueryExecutionContextBase implements ExecutionContext {\n private err: any;\n private state: any;\n private static readonly STATES = ParallelQueryExecutionContextBaseStates;\n private routingProvider: SmartRoutingMapProvider;\n private readonly requestContinuation: any;\n private respHeaders: CosmosHeaders;\n private readonly unfilledDocumentProducersQueue: PriorityQueue<DocumentProducer>;\n private readonly bufferedDocumentProducersQueue: PriorityQueue<DocumentProducer>;\n // TODO: update type of buffer from any --> generic can be used here\n private buffer: any[];\n private partitionDataPatchMap: Map<string, QueryRangeMapping> = new Map();\n private patchCounter: number = 0;\n private readonly updatedContinuationRanges: Map<string, PartitionRangeUpdate> = new Map();\n private readonly sem: any;\n private readonly diagnosticNodeWrapper: {\n consumed: boolean;\n diagnosticNode: DiagnosticNodeInternal;\n };\n /**\n * Provides the ParallelQueryExecutionContextBase.\n * This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from.\n *\n * When handling a parallelized query, it instantiates one instance of\n * DocumentProcuder per target partition key range and aggregates the result of each.\n *\n * @param clientContext - The service endpoint to use to create the client.\n * @param collectionLink - The Collection Link\n * @param options - Represents the feed options.\n * @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo\n * @hidden\n */\n constructor(\n private readonly clientContext: ClientContext,\n private readonly collectionLink: string,\n private readonly query: string | SqlQuerySpec,\n private readonly options: FeedOptions,\n private readonly partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo,\n private readonly correlatedActivityId: string,\n private readonly rangeManager: TargetPartitionRangeManager,\n private readonly queryProcessingStrategy: QueryProcessingStrategy,\n private readonly documentProducerComparator: (\n dp1: DocumentProducer,\n dp2: DocumentProducer,\n ) => number,\n ) {\n this.clientContext = clientContext;\n this.collectionLink = collectionLink;\n this.query = query;\n this.options = options;\n this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;\n this.correlatedActivityId = correlatedActivityId;\n this.diagnosticNodeWrapper = {\n consumed: false,\n diagnosticNode: new DiagnosticNodeInternal(\n clientContext.diagnosticLevel,\n DiagnosticNodeType.PARALLEL_QUERY_NODE,\n null,\n ),\n };\n this.diagnosticNodeWrapper.diagnosticNode.addData({ stateful: true });\n this.err = undefined;\n this.state = ParallelQueryExecutionContextBase.STATES.started;\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n this.buffer = [];\n this.requestContinuation = options\n ? options.continuationToken || options.continuation\n : undefined;\n\n // Validate continuation token usage immediately\n if (this.requestContinuation && !this.options.enableQueryControl) {\n throw new Error(\n \"Continuation tokens are supported when enableQueryControl is set true in FeedOptions\",\n );\n }\n\n // response headers of undergoing operation\n this.respHeaders = getInitialHeader();\n // Make priority queue for documentProducers\n this.unfilledDocumentProducersQueue = new PriorityQueue<DocumentProducer>(\n (a: DocumentProducer, b: DocumentProducer) => this.compareDocumentProducersByRange(a, b),\n );\n this.bufferedDocumentProducersQueue = new PriorityQueue<DocumentProducer>(\n (a: DocumentProducer, b: DocumentProducer) => this.documentProducerComparator(b, a),\n );\n // Creating the documentProducers\n this.sem = semaphore(1);\n this.sem.take(() => this._initializeDocumentProducers());\n }\n\n /**\n * Determine if there are still remaining resources to processs based on the value of the continuation\n * token or the elements remaining on the current batch in the QueryIterator.\n * @returns true if there is other elements to process in the ParallelQueryExecutionContextBase.\n */\n public hasMoreResults(): boolean {\n return (\n !this.err &&\n (this.buffer.length > 0 || this.state !== ParallelQueryExecutionContextBase.STATES.ended)\n );\n }\n\n /**\n * Fetches more results from the query execution context.\n * @param diagnosticNode - Optional diagnostic node for tracing.\n * @returns A promise that resolves to the fetched results.\n * @hidden\n */\n public async fetchMore(diagnosticNode?: DiagnosticNodeInternal): Promise<Response<any>> {\n await this.bufferDocumentProducers(diagnosticNode);\n await this.fillBufferFromBufferQueue();\n return this.drainBufferedItems();\n }\n\n /**\n * Processes buffered document producers\n * @returns A promise that resolves when processing is complete.\n */\n private async processBufferedDocumentProducers(): Promise<void> {\n while (\n this.hasBufferedProducers() &&\n this.shouldProcessBufferedProducers(this.isUnfilledQueueEmpty())\n ) {\n const producer = this.getNextBufferedProducer();\n if (!producer) break;\n\n await this.processDocumentProducer(producer);\n }\n }\n\n /**\n * Processes a single document producer using template method pattern.\n * Common structure with query-specific processing delegated to subclasses.\n */\n private async processDocumentProducer(producer: DocumentProducer): Promise<void> {\n const response = await this.fetchFromProducer(producer);\n this._mergeWithActiveResponseHeaders(response.headers);\n\n if (response.result) {\n this.addToBuffer(response.result);\n this.handlePartitionMapping(producer, response.result);\n }\n\n // Handle producer lifecycle\n if (producer.peakNextItem() !== undefined) {\n this.requeueProducer(producer);\n } else if (producer.hasMoreResults()) {\n this.moveToUnfilledQueue(producer);\n }\n }\n\n /**\n * Fetches data from a document producer - implemented by subclasses.\n */\n protected abstract fetchFromProducer(producer: DocumentProducer): Promise<Response<any>>;\n\n /**\n * Handles partition mapping updates - implemented in base class using template method pattern.\n * Child classes provide query-specific parameters through abstract methods.\n */\n private handlePartitionMapping(producer: DocumentProducer, result: any): void {\n const itemCount = result?.length || 0;\n const continuationToken = this.getContinuationToken(producer);\n const mapping = {\n itemCount,\n partitionKeyRange: producer.targetPartitionKeyRange,\n continuationToken,\n };\n\n this.updatePartitionMapping(mapping);\n }\n\n /**\n * Gets the continuation token to use - implemented by subclasses.\n */\n private getContinuationToken(producer: DocumentProducer): string {\n const hasMoreBufferedItems = producer.peakNextItem() !== undefined;\n return hasMoreBufferedItems ? producer.previousContinuationToken : producer.continuationToken;\n }\n /**\n * Determines if buffered producers should continue to be processed based on query-specific rules.\n * @param isUnfilledQueueEmpty - Whether the unfilled queue is empty\n */\n protected abstract shouldProcessBufferedProducers(isUnfilledQueueEmpty: boolean): boolean;\n\n /**\n * Updates partition mapping - creates new entry or merges with existing for ORDER BY queries.\n */\n private updatePartitionMapping(mapping: QueryRangeMapping): void {\n const currentPatch = this.partitionDataPatchMap.get(this.patchCounter.toString());\n const isSamePartition = currentPatch?.partitionKeyRange?.id === mapping.partitionKeyRange.id;\n\n if (isSamePartition && currentPatch) {\n currentPatch.itemCount += mapping.itemCount;\n currentPatch.continuationToken = mapping.continuationToken;\n return;\n }\n // Create new partition mapping entry\n this.partitionDataPatchMap.set((++this.patchCounter).toString(), mapping);\n }\n\n /**\n * Checks if the unfilled queue is empty (used by ORDER BY for processing control).\n */\n protected isUnfilledQueueEmpty(): boolean {\n return this.unfilledDocumentProducersQueue.size() === 0;\n }\n\n /**\n * Initializes document producers and fills the priority queue.\n * Handles both continuation token and fresh query scenarios.\n */\n private async _initializeDocumentProducers(): Promise<void> {\n try {\n const targetPartitionRanges = await this._onTargetPartitionRanges();\n const documentProducers = this.requestContinuation\n ? await this._createDocumentProducersFromContinuation(targetPartitionRanges)\n : this._createDocumentProducersFromFresh(targetPartitionRanges);\n\n // Fill up our priority queue with documentProducers\n this._enqueueDocumentProducers(documentProducers);\n this.sem.leave();\n } catch (err: any) {\n this.err = err;\n this.sem.leave();\n }\n }\n\n /**\n * Creates document producers from continuation token scenario.\n */\n private async _createDocumentProducersFromContinuation(\n targetPartitionRanges: any[],\n ): Promise<DocumentProducer[]> {\n // Parse continuation token to get range mappings and check for split/merge scenarios\n const parsedToken = this._parseContinuationToken(this.requestContinuation);\n const continuationRanges = await this._handlePartitionRangeChanges(parsedToken);\n\n // Use strategy to create additional query info from parsed token\n const additionalQueryInfo = this.queryProcessingStrategy.createAdditionalQueryInfo(parsedToken);\n\n const filterResult = this.rangeManager.filterPartitionRanges(\n targetPartitionRanges,\n continuationRanges,\n additionalQueryInfo,\n );\n\n // Extract ranges and tokens from the combined result\n const rangeTokenPairs = filterResult.rangeTokenPairs;\n\n // Use strategy to create filter context for continuation token processing\n const filterContext = this.queryProcessingStrategy.createFilterContext(parsedToken);\n\n return rangeTokenPairs.map((rangeTokenPair) =>\n this._createDocumentProducerFromRangeTokenPair(\n rangeTokenPair,\n continuationRanges,\n filterContext,\n ),\n );\n }\n\n /**\n * Creates document producers from fresh query scenario (no continuation token).\n */\n private _createDocumentProducersFromFresh(targetPartitionRanges: any[]): DocumentProducer[] {\n return targetPartitionRanges.map((partitionTargetRange: any) =>\n this._createTargetPartitionQueryExecutionContext(partitionTargetRange, undefined),\n );\n }\n\n /**\n * Creates a document producer from a range token pair (continuation token scenario).\n */\n private _createDocumentProducerFromRangeTokenPair(\n rangeTokenPair: any,\n continuationRanges: any[],\n filterContext: any,\n ): DocumentProducer {\n const partitionTargetRange = rangeTokenPair.range;\n const continuationToken = rangeTokenPair.continuationToken;\n const filterCondition = rangeTokenPair.filteringCondition || undefined;\n\n // Find EPK ranges for this partition range from processed continuation response\n const matchingContinuationRange = continuationRanges.find(\n (cr) => cr.range.id === partitionTargetRange.id,\n );\n const startEpk = matchingContinuationRange?.epkMin;\n const endEpk = matchingContinuationRange?.epkMax;\n\n // Use strategy to determine partition-specific filter context\n const targetPartitionId =\n continuationRanges.length > 0 && continuationRanges[continuationRanges.length - 1].range\n ? continuationRanges[continuationRanges.length - 1].range.id\n : undefined;\n const partitionFilterContext = this.queryProcessingStrategy.getPartitionFilterContext(\n filterContext,\n targetPartitionId,\n partitionTargetRange.id,\n );\n\n return this._createTargetPartitionQueryExecutionContext(\n partitionTargetRange,\n continuationToken,\n startEpk,\n endEpk,\n !!(startEpk && endEpk), // populateEpkRangeHeaders - true if both EPK values are present\n filterCondition,\n partitionFilterContext,\n );\n }\n\n /**\n * Enqueues document producers into the unfilled queue.\n */\n private _enqueueDocumentProducers(documentProducers: DocumentProducer[]): void {\n documentProducers.forEach((documentProducer) => {\n try {\n this.unfilledDocumentProducersQueue.enq(documentProducer);\n } catch (e: any) {\n this.err = e;\n }\n });\n }\n\n /**\n * Checks if there are buffered document producers ready for processing.\n * Encapsulates queue size checking.\n */\n private hasBufferedProducers(): boolean {\n return this.bufferedDocumentProducersQueue.size() > 0;\n }\n\n /**\n * Gets the next buffered document producer for processing.\n * Encapsulates queue dequeuing logic.\n */\n private getNextBufferedProducer(): DocumentProducer | undefined {\n if (this.bufferedDocumentProducersQueue.size() > 0) {\n return this.bufferedDocumentProducersQueue.deq();\n }\n return undefined;\n }\n\n /**\n * Adds items to the result buffer. Handles both single items and arrays.\n */\n private addToBuffer(items: any[] | any): void {\n if (Array.isArray(items)) {\n if (items.length > 0) {\n this.buffer.push(...items);\n }\n } else if (items) {\n this.buffer.push(items);\n }\n }\n\n /**\n * Moves a producer to the unfilled queue for later processing.\n */\n private moveToUnfilledQueue(producer: DocumentProducer): void {\n this.unfilledDocumentProducersQueue.enq(producer);\n }\n\n /**\n * Re-queues a producer to the buffered queue for further processing.\n */\n private requeueProducer(producer: DocumentProducer): void {\n this.bufferedDocumentProducersQueue.enq(producer);\n }\n\n /**\n * Compares two document producers based on their partition key ranges and EPK values.\n * Primary comparison: minInclusive values for left-to-right range traversal\n * Secondary comparison: EPK ranges when minInclusive values are identical\n * @param a - First document producer\n * @param b - Second document producer\n * @returns Comparison result for priority queue ordering\n * @hidden\n */\n private compareDocumentProducersByRange(a: DocumentProducer, b: DocumentProducer): number {\n const aMinInclusive = a.targetPartitionKeyRange.minInclusive;\n const bMinInclusive = b.targetPartitionKeyRange.minInclusive;\n const minInclusiveComparison = bMinInclusive.localeCompare(aMinInclusive);\n\n // If minInclusive values are the same, check minEPK ranges if they exist\n if (minInclusiveComparison === 0) {\n const aMinEpk = a.startEpk;\n const bMinEpk = b.startEpk;\n if (aMinEpk && bMinEpk) {\n return bMinEpk.localeCompare(aMinEpk);\n }\n }\n\n return minInclusiveComparison;\n }\n\n /**\n * Detects partition splits/merges by analyzing parsed continuation token ranges and comparing with current topology\n * @param parsed - The continuation token containing range mappings to analyze\n * @returns Array of processed ranges with EPK info\n */\n private async _handlePartitionRangeChanges(\n parsed: BaseContinuationToken,\n ): Promise<{ range: any; continuationToken?: string; epkMin?: string; epkMax?: string }[]> {\n const processedRanges: {\n range: any;\n continuationToken?: string;\n epkMin?: string;\n epkMax?: string;\n }[] = [];\n\n // Extract range mappings from the already parsed token\n const rangeMappings = parsed.rangeMappings;\n\n if (!rangeMappings || rangeMappings.length === 0) {\n return [];\n }\n\n // Check each range mapping for potential splits/merges\n for (const rangeWithToken of rangeMappings) {\n // Create a new QueryRange instance from the simplified range data\n const range = rangeWithToken.queryRange;\n const queryRange: QueryRange = new QueryRange(\n range.min,\n range.max,\n true, // isMinInclusive - assumption: always true\n false, // isMaxInclusive - assumption: always false (max is exclusive)\n );\n\n const rangeMin = queryRange.min;\n const rangeMax = queryRange.max;\n\n // Get current overlapping ranges for this continuation token range\n const overlappingRanges = await this.routingProvider.getOverlappingRanges(\n this.collectionLink,\n [queryRange],\n this.getDiagnosticNode(),\n );\n\n // Detect split/merge scenario based on the number of overlapping ranges\n if (overlappingRanges.length === 0) {\n continue;\n } else if (overlappingRanges.length === 1) {\n // Check if it's the same range (no change) or a merge scenario\n const currentRange = overlappingRanges[0];\n if (currentRange.minInclusive !== rangeMin || currentRange.maxExclusive !== rangeMax) {\n // Merge scenario - include EPK ranges from original continuation token range\n await this._handleContinuationTokenMerge(rangeWithToken, currentRange);\n processedRanges.push({\n range: currentRange,\n continuationToken: rangeWithToken.continuationToken,\n epkMin: rangeMin, // Original range min becomes EPK min\n epkMax: rangeMax, // Original range max becomes EPK max\n });\n } else {\n // Same range - no merge, no EPK ranges needed\n processedRanges.push({\n range: currentRange,\n continuationToken: rangeWithToken.continuationToken,\n });\n }\n } else {\n // Split scenario - one range from continuation token now maps to multiple ranges\n await this._handleContinuationTokenSplit(rangeWithToken, overlappingRanges);\n // Add all overlapping ranges with the same continuation token to processed ranges\n overlappingRanges.forEach((rangeValue) => {\n processedRanges.push({\n range: rangeValue,\n continuationToken: rangeWithToken.continuationToken,\n });\n });\n }\n }\n\n return processedRanges;\n }\n\n /**\n * Parses the continuation token based on query type\n * @param continuationToken - The continuation token string to parse\n * @returns Parsed continuation token object (ORDER BY or Parallel query token)\n * @throws ErrorResponse when continuation token is malformed or cannot be parsed\n */\n private _parseContinuationToken(continuationToken: string): BaseContinuationToken {\n try {\n return this.queryProcessingStrategy.parseContinuationToken(continuationToken);\n } catch (e) {\n throw new ErrorResponse(\n `Invalid continuation token format. Expected token with rangeMappings property. ` +\n `Ensure the continuation token was generated by a compatible query and has not been modified.`,\n );\n }\n }\n\n /**\n * Handles partition merge scenario for continuation token ranges\n */\n private async _handleContinuationTokenMerge(\n rangeWithToken: QueryRangeWithContinuationToken,\n _newMergedRange: PartitionKeyRange,\n ): Promise<void> {\n const rangeKey = `${rangeWithToken.queryRange.min}-${rangeWithToken.queryRange.max}`;\n this.updatedContinuationRanges.set(rangeKey, {\n oldRange: {\n min: rangeWithToken.queryRange.min,\n max: rangeWithToken.queryRange.max,\n isMinInclusive: true, // Assumption: min is always inclusive\n isMaxInclusive: false, // Assumption: max is always exclusive\n },\n newRanges: [\n {\n min: rangeWithToken.queryRange.min,\n max: rangeWithToken.queryRange.max,\n isMinInclusive: true, // Assumption: min is always inclusive\n isMaxInclusive: false, // Assumption: max is always exclusive\n },\n ],\n continuationToken: rangeWithToken.continuationToken,\n });\n }\n\n /**\n * Handles partition split scenario for continuation token ranges\n */\n private async _handleContinuationTokenSplit(\n rangeWithToken: QueryRangeWithContinuationToken,\n overlappingRanges: any[],\n ): Promise<void> {\n const rangeKey = `${rangeWithToken.queryRange.min}-${rangeWithToken.queryRange.max}`;\n this.updatedContinuationRanges.set(rangeKey, {\n oldRange: {\n min: rangeWithToken.queryRange.min,\n max: rangeWithToken.queryRange.max,\n isMinInclusive: true, // Assumption: min is always inclusive\n isMaxInclusive: false, // Assumption: max is always exclusive\n },\n newRanges: overlappingRanges.map((range) => ({\n min: range.minInclusive,\n max: range.maxExclusive,\n isMinInclusive: true,\n isMaxInclusive: false,\n })),\n continuationToken: rangeWithToken.continuationToken,\n });\n }\n\n /**\n * Handles partition merge scenario for continuation token ranges\n */\n private _mergeWithActiveResponseHeaders(headers: CosmosHeaders): void {\n mergeHeaders(this.respHeaders, headers);\n }\n\n private _getAndResetActiveResponseHeaders(): CosmosHeaders {\n const ret = this.respHeaders;\n this.respHeaders = getInitialHeader();\n return ret;\n }\n\n private getDiagnosticNode(): DiagnosticNodeInternal {\n return this.diagnosticNodeWrapper.diagnosticNode;\n }\n\n private async _onTargetPartitionRanges(): Promise<any[]> {\n // invokes the callback when the target partition ranges are ready\n const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges;\n const queryRanges = parsedRanges.map((item) => QueryRange.parseFromDict(item));\n return this.routingProvider.getOverlappingRanges(\n this.collectionLink,\n queryRanges,\n this.getDiagnosticNode(),\n );\n }\n\n /**\n * Gets the replacement ranges for a partitionkeyrange that has been split\n */\n private async _getReplacementPartitionKeyRanges(\n documentProducer: DocumentProducer,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<any[]> {\n const partitionKeyRange = documentProducer.targetPartitionKeyRange;\n // Download the new routing map\n this.routingProvider = new SmartRoutingMapProvider(this.clientContext);\n // Get the queryRange that relates to this partitionKeyRange\n const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange);\n return this.routingProvider.getOverlappingRanges(\n this.collectionLink,\n [queryRange],\n diagnosticNode,\n );\n }\n\n private async _enqueueReplacementDocumentProducers(\n error: any,\n diagnosticNode: DiagnosticNodeInternal,\n documentProducer: DocumentProducer,\n ): Promise<void> {\n // Get the replacement ranges\n const replacementPartitionKeyRanges = await this._getReplacementPartitionKeyRanges(\n documentProducer,\n diagnosticNode,\n );\n\n if (replacementPartitionKeyRanges.length === 0) {\n throw error;\n }\n\n if (this.requestContinuation) {\n // Update composite continuation token to handle partition split\n this._updateContinuationTokenOnPartitionChange(\n documentProducer,\n replacementPartitionKeyRanges,\n );\n }\n\n if (replacementPartitionKeyRanges.length === 1) {\n // Partition is gone due to Merge\n // Create the replacement documentProducer with populateEpkRangeHeaders Flag set to true to set startEpk and endEpk headers\n const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(\n replacementPartitionKeyRanges[0],\n documentProducer.continuationToken,\n documentProducer.startEpk,\n documentProducer.endEpk,\n true,\n );\n\n this.unfilledDocumentProducersQueue.enq(replacementDocumentProducer);\n } else {\n // Create the replacement documentProducers\n const replacementDocumentProducers: DocumentProducer[] = [];\n replacementPartitionKeyRanges.forEach((partitionKeyRange) => {\n const queryRange = QueryRange.parsePartitionKeyRange(partitionKeyRange);\n // Create replacment document producers with the parent's continuationToken\n const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(\n partitionKeyRange,\n documentProducer.continuationToken,\n queryRange.min,\n queryRange.max,\n false,\n );\n replacementDocumentProducers.push(replacementDocumentProducer);\n });\n\n // add document producers to the queue\n replacementDocumentProducers.forEach((replacementDocumentProducer) => {\n if (replacementDocumentProducer.hasMoreResults()) {\n this.unfilledDocumentProducersQueue.enq(replacementDocumentProducer);\n }\n });\n }\n }\n\n private _updateContinuationTokenOnPartitionChange(\n originalDocumentProducer: DocumentProducer,\n replacementPartitionKeyRanges: any[],\n ): void {\n const rangeWithToken = this._createQueryRangeWithContinuationToken(originalDocumentProducer);\n if (replacementPartitionKeyRanges.length === 1) {\n this._handleContinuationTokenMerge(rangeWithToken, replacementPartitionKeyRanges[0]);\n } else {\n this._handleContinuationTokenSplit(rangeWithToken, replacementPartitionKeyRanges);\n }\n }\n\n /**\n * Creates a QueryRangeWithContinuationToken object from a DocumentProducer.\n * Uses the DocumentProducer's target partition key range and continuation token.\n * @param documentProducer - The DocumentProducer to convert\n * @returns QueryRangeWithContinuationToken object for token operations\n */\n private _createQueryRangeWithContinuationToken(\n documentProducer: DocumentProducer,\n ): QueryRangeWithContinuationToken {\n const partitionRange = documentProducer.targetPartitionKeyRange;\n\n // Create a simplified QueryRange using the partition key range boundaries\n const simplifiedQueryRange: RangeBoundary = {\n min: documentProducer.startEpk || partitionRange.minInclusive,\n max: documentProducer.endEpk || partitionRange.maxExclusive,\n };\n\n return {\n queryRange: simplifiedQueryRange,\n continuationToken: documentProducer.continuationToken,\n };\n }\n\n private static _needPartitionKeyRangeCacheRefresh(error: any): boolean {\n // TODO: any error\n return (\n error.code === StatusCodes.Gone &&\n \"substatus\" in error &&\n error[\"substatus\"] === SubStatusCodes.PartitionKeyRangeGone\n );\n }\n\n /**\n * Creates target partition range Query Execution Context\n */\n private _createTargetPartitionQueryExecutionContext(\n partitionKeyTargetRange: any,\n continuationToken?: any,\n startEpk?: string,\n endEpk?: string,\n populateEpkRangeHeaders?: boolean,\n filterCondition?: string,\n filterContext?: FilterContext,\n ): DocumentProducer {\n let rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo?.rewrittenQuery;\n let sqlQuerySpec: SqlQuerySpec;\n const query = this.query;\n if (typeof query === \"string\") {\n sqlQuerySpec = { query };\n } else {\n sqlQuerySpec = query;\n }\n\n const formatPlaceHolder = \"{documentdb-formattableorderbyquery-filter}\";\n if (rewrittenQuery) {\n sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec));\n rewrittenQuery = filterCondition\n ? rewrittenQuery.replace(formatPlaceHolder, filterCondition)\n : rewrittenQuery.replace(formatPlaceHolder, \"true\");\n sqlQuerySpec[\"query\"] = rewrittenQuery;\n }\n\n const options = { ...this.options };\n options.continuationToken = continuationToken;\n\n let filter: FilterStrategy | undefined;\n if (filterContext) {\n filter = new RidSkipCountFilter(filterContext);\n }\n\n return new DocumentProducer(\n this.clientContext,\n this.collectionLink,\n sqlQuerySpec,\n partitionKeyTargetRange,\n options,\n this.correlatedActivityId,\n startEpk,\n endEpk,\n populateEpkRangeHeaders,\n filter,\n );\n }\n private async drainBufferedItems(): Promise<Response<any>> {\n return new Promise<Response<any>>((resolve, reject) => {\n this.sem.take(() => {\n if (this.err) {\n // if there is a prior error return error\n this.sem.leave();\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n // return undefined if there is no more results\n if (this.buffer.length === 0) {\n this.sem.leave();\n const partitionDataPatchMap = this.partitionDataPatchMap;\n this.partitionDataPatchMap = new Map<string, QueryRangeMapping>();\n this.patchCounter = 0;\n // Get and reset updated continuation ranges\n const updatedContinuationRanges: PartitionRangeUpdates = Object.fromEntries(\n this.updatedContinuationRanges,\n );\n this.updatedContinuationRanges.clear();\n const result = createParallelQueryResult(\n [],\n partitionDataPatchMap,\n updatedContinuationRanges,\n undefined,\n );\n\n return resolve({\n result:\n this.state === ParallelQueryExecutionContextBase.STATES.ended ? undefined : result,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n }\n // draing the entire buffer object and return that in result of return object\n const bufferedResults = this.buffer;\n this.buffer = [];\n // reset the patchToRangeMapping\n const partitionDataPatchMap = this.partitionDataPatchMap;\n this.partitionDataPatchMap = new Map<string, QueryRangeMapping>();\n this.patchCounter = 0;\n\n // Get and reset updated continuation ranges\n const updatedContinuationRanges: PartitionRangeUpdates = Object.fromEntries(\n this.updatedContinuationRanges,\n );\n this.updatedContinuationRanges.clear();\n\n // release the lock before returning\n this.sem.leave();\n\n const result = createParallelQueryResult(\n bufferedResults,\n partitionDataPatchMap,\n updatedContinuationRanges,\n undefined,\n );\n\n return resolve({\n result,\n headers: this._getAndResetActiveResponseHeaders(),\n });\n });\n });\n }\n\n /**\n * Buffers document producers based on the maximum degree of parallelism.\n * Moves document producers from the unfilled queue to the buffered queue.\n * @param diagnosticNode - The diagnostic node for logging and tracing.\n * @returns A promise that resolves when buffering is complete.\n */\n private async bufferDocumentProducers(diagnosticNode?: DiagnosticNodeInternal): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n this.sem.take(async () => {\n if (this.err) {\n this.sem.leave();\n reject(this.err);\n return;\n }\n this.updateStates(this.err);\n\n if (this.state === ParallelQueryExecutionContextBase.STATES.ended) {\n this.sem.leave();\n resolve();\n return;\n }\n\n if (this.unfilledDocumentProducersQueue.size() === 0) {\n this.sem.leave();\n resolve();\n return;\n }\n\n try {\n const maxDegreeOfParallelism =\n this.options.maxDegreeOfParallelism === undefined ||\n this.options.maxDegreeOfParallelism < 1\n ? this.unfilledDocumentProducersQueue.size() // number of partitions\n : Math.min(\n this.options.maxDegreeOfParallelism,\n this.unfilledDocumentProducersQueue.size(),\n );\n\n const documentProducers: DocumentProducer[] = [];\n while (\n documentProducers.length < maxDegreeOfParallelism &&\n this.unfilledDocumentProducersQueue.size() > 0\n ) {\n let documentProducer: DocumentProducer;\n try {\n documentProducer = this.unfilledDocumentProducersQueue.deq();\n } catch (e: any) {\n this.err = e;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n documentProducers.push(documentProducer);\n }\n\n const bufferDocumentProducer = async (\n documentProducer: DocumentProducer,\n ): Promise<void> => {\n try {\n const headers = await documentProducer.bufferMore(diagnosticNode);\n this._mergeWithActiveResponseHeaders(headers);\n\n // Always track this document producer in patchToRangeMapping, even if it has no results\n // This ensures we maintain a record of all partition ranges that were scanned\n const nextItem = documentProducer.peakNextItem();\n if (nextItem !== undefined) {\n this.bufferedDocumentProducersQueue.enq(documentProducer);\n } else {\n // Track document producer with no results in patchToRangeMapping\n // This represents a scanned partition that yielded no results\n // IMPORTANT: Only include if continuation token is NOT null/exhausted\n // Document producers with no data in buffer and no continuation token are exhausted and should not be added to partitionDataPatchMap to prevent infinite loops in order by queries\n if (\n documentProducer.continuationToken &&\n documentProducer.continuationToken !== \"\" &&\n documentProducer.continuationToken.toLowerCase() !== \"null\"\n ) {\n const patchKey = `empty-${documentProducer.targetPartitionKeyRange.id}-${documentProducer.targetPartitionKeyRange.minInclusive}`;\n this.partitionDataPatchMap.set(patchKey, {\n itemCount: 0, // 0 items for empty result set\n partitionKeyRange: documentProducer.targetPartitionKeyRange,\n continuationToken: documentProducer.continuationToken,\n });\n }\n if (documentProducer.hasMoreResults()) {\n this.unfilledDocumentProducersQueue.enq(documentProducer);\n }\n }\n } catch (err) {\n if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {\n // We want the document producer enqueued\n // So that later parts of the code can repair the execution context\n // refresh the partition key ranges and ctreate new document producers and add it to the queue\n await this._enqueueReplacementDocumentProducers(\n err,\n diagnosticNode,\n documentProducer,\n );\n resolve();\n } else {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(err);\n }\n }\n };\n\n try {\n await Promise.all(\n documentProducers.map((producer) => bufferDocumentProducer(producer)),\n );\n } catch (err) {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(err);\n return;\n }\n resolve();\n } catch (err) {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(err);\n } finally {\n this.sem.leave();\n }\n });\n });\n }\n /**\n * Drains the buffer of filled document producers and appends their items to the main buffer.\n * Uses template method pattern - delegates actual processing to subclasses.\n * @returns A promise that resolves when the buffer is filled.\n */\n private async fillBufferFromBufferQueue(): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n this.sem.take(async () => {\n if (this.err) {\n // if there is a prior error return error\n this.sem.leave();\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n }\n\n if (\n this.state === ParallelQueryExecutionContextBase.STATES.ended ||\n this.bufferedDocumentProducersQueue.size() === 0\n ) {\n this.sem.leave();\n resolve();\n return;\n }\n\n try {\n await this.processBufferedDocumentProducers();\n this.updateStates(this.err);\n } catch (err) {\n this.err = err;\n this.err.headers = this._getAndResetActiveResponseHeaders();\n reject(this.err);\n return;\n } finally {\n // release the lock before returning\n this.sem.leave();\n }\n resolve();\n return;\n });\n });\n }\n\n private updateStates(error: any): void {\n if (error) {\n this.err = error;\n this.state = ParallelQueryExecutionContextBase.STATES.ended;\n return;\n }\n\n if (this.state === ParallelQueryExecutionContextBase.STATES.started) {\n this.state = ParallelQueryExecutionContextBase.STATES.inProgress;\n }\n\n const hasNoActiveProducers =\n this.unfilledDocumentProducersQueue.size() === 0 &&\n this.bufferedDocumentProducersQueue.size() === 0;\n\n if (hasNoActiveProducers) {\n this.state = ParallelQueryExecutionContextBase.STATES.ended;\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { QueryRangeMapping } from "./queryRangeMapping.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents the result structure returned by parallel query execution contexts
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
export interface ParallelQueryResult {
|
|
7
|
+
/**
|
|
8
|
+
* The actual query result data (documents/items)
|
|
9
|
+
*/
|
|
10
|
+
buffer: any[];
|
|
11
|
+
/**
|
|
12
|
+
* Mapping of partition key ranges used during query execution
|
|
13
|
+
*/
|
|
14
|
+
partitionKeyRangeMap: Map<string, QueryRangeMapping>;
|
|
15
|
+
/**
|
|
16
|
+
* Updated continuation ranges after partition split/merge operations
|
|
17
|
+
*/
|
|
18
|
+
updatedContinuationRanges?: Record<string, any>;
|
|
19
|
+
/**
|
|
20
|
+
* Optional array of orderBy items corresponding to each item in the buffer
|
|
21
|
+
* Used for ORDER BY queries to track sorting criteria
|
|
22
|
+
*/
|
|
23
|
+
orderByItems?: OrderByItemWithRid[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new ParallelQueryResult with the specified data
|
|
27
|
+
* @param buffer - The query result data
|
|
28
|
+
* @param partitionKeyRangeMap - Partition key range mappings
|
|
29
|
+
* @param updatedContinuationRanges - Updated continuation ranges
|
|
30
|
+
* @param orderByItems - Optional array of orderBy items for each buffer item
|
|
31
|
+
* @returns A new ParallelQueryResult instance
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
export declare function createParallelQueryResult(buffer: any[], partitionKeyRangeMap: Map<string, QueryRangeMapping>, updatedContinuationRanges?: Record<string, any>, orderByItems?: OrderByItemWithRid[]): ParallelQueryResult;
|
|
35
|
+
//# sourceMappingURL=parallelQueryResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallelQueryResult.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryResult.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAkBhE;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,GAAG,EAAE,CAAC;IAEd;;OAEG;IACH,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAErD;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEhD;;;OAGG;IACH,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,GAAG,EAAE,EACb,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACpD,yBAAyB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC/C,YAAY,CAAC,EAAE,kBAAkB,EAAE,GAClC,mBAAmB,CAWrB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.createParallelQueryResult = createParallelQueryResult;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new ParallelQueryResult with the specified data
|
|
8
|
+
* @param buffer - The query result data
|
|
9
|
+
* @param partitionKeyRangeMap - Partition key range mappings
|
|
10
|
+
* @param updatedContinuationRanges - Updated continuation ranges
|
|
11
|
+
* @param orderByItems - Optional array of orderBy items for each buffer item
|
|
12
|
+
* @returns A new ParallelQueryResult instance
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
function createParallelQueryResult(buffer, partitionKeyRangeMap, updatedContinuationRanges, orderByItems) {
|
|
16
|
+
const result = {
|
|
17
|
+
buffer,
|
|
18
|
+
partitionKeyRangeMap,
|
|
19
|
+
updatedContinuationRanges,
|
|
20
|
+
};
|
|
21
|
+
if (orderByItems !== undefined) {
|
|
22
|
+
result.orderByItems = orderByItems;
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=parallelQueryResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parallelQueryResult.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/parallelQueryResult.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAwDlC,8DAgBC;AAzBD;;;;;;;;GAQG;AACH,SAAgB,yBAAyB,CACvC,MAAa,EACb,oBAAoD,EACpD,yBAA+C,EAC/C,YAAmC;IAEnC,MAAM,MAAM,GAAwB;QAClC,MAAM;QACN,oBAAoB;QACpB,yBAAyB;KAC1B,CAAC;IAEF,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { QueryRangeMapping } from \"./queryRangeMapping.js\";\n\n/**\n * Represents an ORDER BY item with its associated document resource ID.\n * Used for tracking ORDER BY criteria and document identity in sorted query results.\n * @internal\n */\nexport interface OrderByItemWithRid {\n /**\n * The ORDER BY values for this document\n */\n orderByItems: any[];\n /**\n * The resource ID (_rid) of the document\n */\n _rid: string;\n}\n\n/**\n * Represents the result structure returned by parallel query execution contexts\n * @hidden\n */\nexport interface ParallelQueryResult {\n /**\n * The actual query result data (documents/items)\n */\n buffer: any[];\n\n /**\n * Mapping of partition key ranges used during query execution\n */\n partitionKeyRangeMap: Map<string, QueryRangeMapping>;\n\n /**\n * Updated continuation ranges after partition split/merge operations\n */\n updatedContinuationRanges?: Record<string, any>;\n\n /**\n * Optional array of orderBy items corresponding to each item in the buffer\n * Used for ORDER BY queries to track sorting criteria\n */\n orderByItems?: OrderByItemWithRid[];\n}\n\n/**\n * Creates a new ParallelQueryResult with the specified data\n * @param buffer - The query result data\n * @param partitionKeyRangeMap - Partition key range mappings\n * @param updatedContinuationRanges - Updated continuation ranges\n * @param orderByItems - Optional array of orderBy items for each buffer item\n * @returns A new ParallelQueryResult instance\n * @hidden\n */\nexport function createParallelQueryResult(\n buffer: any[],\n partitionKeyRangeMap: Map<string, QueryRangeMapping>,\n updatedContinuationRanges?: Record<string, any>,\n orderByItems?: OrderByItemWithRid[],\n): ParallelQueryResult {\n const result: ParallelQueryResult = {\n buffer,\n partitionKeyRangeMap,\n updatedContinuationRanges,\n };\n\n if (orderByItems !== undefined) {\n result.orderByItems = orderByItems;\n }\n return result;\n}\n"]}
|
|
@@ -13,18 +13,48 @@ export declare class PipelinedQueryExecutionContext implements ExecutionContext
|
|
|
13
13
|
private partitionedQueryExecutionInfo;
|
|
14
14
|
private emitRawOrderByPayload;
|
|
15
15
|
private fetchBuffer;
|
|
16
|
-
private fetchMoreRespHeaders;
|
|
17
16
|
private endpoint;
|
|
18
|
-
private
|
|
19
|
-
private vectorSearchBufferSize;
|
|
20
|
-
private static DEFAULT_PAGE_SIZE;
|
|
21
|
-
private static DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;
|
|
22
|
-
private nonStreamingOrderBy;
|
|
17
|
+
private readonly fetchImplementation;
|
|
23
18
|
constructor(clientContext: ClientContext, collectionLink: string, query: string | SqlQuerySpec, options: FeedOptions, partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo, correlatedActivityId: string, emitRawOrderByPayload?: boolean);
|
|
24
19
|
hasMoreResults(): boolean;
|
|
25
20
|
fetchMore(diagnosticNode: DiagnosticNodeInternal): Promise<Response<any>>;
|
|
26
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Creates a non-streaming endpoint for vector search and similar queries that require buffering
|
|
23
|
+
*/
|
|
24
|
+
private createNonStreamingEndpoint;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a streaming endpoint with proper pipeline components
|
|
27
|
+
*/
|
|
28
|
+
private createStreamingEndpoint;
|
|
29
|
+
/**
|
|
30
|
+
* Creates the base execution context (OrderBy or Parallel)
|
|
31
|
+
*/
|
|
32
|
+
private createBaseExecutionContext;
|
|
33
|
+
/**
|
|
34
|
+
* Wraps base context with appropriate non-streaming component
|
|
35
|
+
*/
|
|
36
|
+
private wrapWithNonStreamingComponent;
|
|
37
|
+
/**
|
|
38
|
+
* Applies GROUP BY components to the pipeline if needed
|
|
39
|
+
*/
|
|
40
|
+
private applyGroupByComponents;
|
|
41
|
+
/**
|
|
42
|
+
* Applies DISTINCT components to the pipeline if needed
|
|
43
|
+
*/
|
|
44
|
+
private applyDistinctComponents;
|
|
45
|
+
/**
|
|
46
|
+
* Applies TOP and OFFSET+LIMIT components to the pipeline if needed
|
|
47
|
+
*/
|
|
48
|
+
private applyLimitComponents;
|
|
49
|
+
/**
|
|
50
|
+
* Validates vector search buffer size constraints
|
|
51
|
+
*/
|
|
52
|
+
private validateVectorSearchBufferSize;
|
|
27
53
|
private calculateVectorSearchBufferSize;
|
|
28
54
|
private checkQueryConstraints;
|
|
55
|
+
/**
|
|
56
|
+
* Analyzes query information and extracts key characteristics for query execution planning
|
|
57
|
+
*/
|
|
58
|
+
private analyzeQueryInfo;
|
|
29
59
|
}
|
|
30
60
|
//# sourceMappingURL=pipelinedQueryExecutionContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelinedQueryExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/pipelinedQueryExecutionContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAa,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"pipelinedQueryExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/queryExecutionContext/pipelinedQueryExecutionContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAa,MAAM,6BAA6B,CAAC;AAO5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAYvF,cAAc;AACd,qBAAa,8BAA+B,YAAW,gBAAgB;IAMnE,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,6BAA6B;I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