@azure/cosmos 4.7.0 → 4.8.0-alpha.20251121.1
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/CosmosClientOptions.d.ts +1 -1
- package/dist/browser/CosmosClientOptions.js.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForEpkRange.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForEpkRange.js +2 -34
- package/dist/browser/client/ChangeFeed/ChangeFeedForEpkRange.js.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.js +2 -35
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts +15 -0
- package/dist/browser/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedIteratorOptions.js.map +1 -1
- package/dist/browser/client/ChangeFeed/InternalChangeFeedOptions.d.ts +3 -0
- package/dist/browser/client/ChangeFeed/InternalChangeFeedOptions.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/InternalChangeFeedOptions.js.map +1 -1
- package/dist/browser/client/ChangeFeed/changeFeedUtils.d.ts +6 -0
- package/dist/browser/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/changeFeedUtils.js +47 -0
- package/dist/browser/client/ChangeFeed/changeFeedUtils.js.map +1 -1
- 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/documents/VectorEmbeddingPolicy.d.ts +4 -0
- package/dist/browser/documents/VectorEmbeddingPolicy.d.ts.map +1 -1
- package/dist/browser/documents/VectorEmbeddingPolicy.js +4 -0
- package/dist/browser/documents/VectorEmbeddingPolicy.js.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/MaxAggregator.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/MaxAggregator.js +4 -0
- package/dist/browser/queryExecutionContext/Aggregators/MaxAggregator.js.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/MinAggregator.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/MinAggregator.js +4 -0
- package/dist/browser/queryExecutionContext/Aggregators/MinAggregator.js.map +1 -1
- 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/request/RequestHandler.d.ts.map +1 -1
- package/dist/browser/request/RequestHandler.js +10 -4
- package/dist/browser/request/RequestHandler.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/CosmosClientOptions.d.ts +1 -1
- package/dist/commonjs/CosmosClientOptions.js.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.js +1 -33
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.js.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.js +1 -34
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts +15 -0
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.js.map +1 -1
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.d.ts +3 -0
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.js.map +1 -1
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.d.ts +6 -0
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.js +48 -0
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.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/documents/VectorEmbeddingPolicy.d.ts +4 -0
- package/dist/commonjs/documents/VectorEmbeddingPolicy.d.ts.map +1 -1
- package/dist/commonjs/documents/VectorEmbeddingPolicy.js +4 -0
- package/dist/commonjs/documents/VectorEmbeddingPolicy.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js +4 -0
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js +4 -0
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js.map +1 -1
- 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/request/RequestHandler.d.ts.map +1 -1
- package/dist/commonjs/request/RequestHandler.js +10 -4
- package/dist/commonjs/request/RequestHandler.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +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/CosmosClientOptions.d.ts +1 -1
- package/dist/esm/CosmosClientOptions.js.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForEpkRange.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForEpkRange.js +2 -34
- package/dist/esm/client/ChangeFeed/ChangeFeedForEpkRange.js.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.js +2 -35
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts +15 -0
- package/dist/esm/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedIteratorOptions.js.map +1 -1
- package/dist/esm/client/ChangeFeed/InternalChangeFeedOptions.d.ts +3 -0
- package/dist/esm/client/ChangeFeed/InternalChangeFeedOptions.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/InternalChangeFeedOptions.js.map +1 -1
- package/dist/esm/client/ChangeFeed/changeFeedUtils.d.ts +6 -0
- package/dist/esm/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/changeFeedUtils.js +47 -0
- package/dist/esm/client/ChangeFeed/changeFeedUtils.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/documents/VectorEmbeddingPolicy.d.ts +4 -0
- package/dist/esm/documents/VectorEmbeddingPolicy.d.ts.map +1 -1
- package/dist/esm/documents/VectorEmbeddingPolicy.js +4 -0
- package/dist/esm/documents/VectorEmbeddingPolicy.js.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/MaxAggregator.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/MaxAggregator.js +4 -0
- package/dist/esm/queryExecutionContext/Aggregators/MaxAggregator.js.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/MinAggregator.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/MinAggregator.js +4 -0
- package/dist/esm/queryExecutionContext/Aggregators/MinAggregator.js.map +1 -1
- 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/request/RequestHandler.d.ts.map +1 -1
- package/dist/esm/request/RequestHandler.js +10 -4
- package/dist/esm/request/RequestHandler.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/CosmosClientOptions.d.ts +1 -1
- package/dist/react-native/CosmosClientOptions.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForEpkRange.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForEpkRange.js +2 -34
- package/dist/react-native/client/ChangeFeed/ChangeFeedForEpkRange.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.js +2 -35
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts +15 -0
- package/dist/react-native/client/ChangeFeed/ChangeFeedIteratorOptions.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedIteratorOptions.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/InternalChangeFeedOptions.d.ts +3 -0
- package/dist/react-native/client/ChangeFeed/InternalChangeFeedOptions.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/InternalChangeFeedOptions.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.d.ts +6 -0
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.js +47 -0
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.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/documents/VectorEmbeddingPolicy.d.ts +4 -0
- package/dist/react-native/documents/VectorEmbeddingPolicy.d.ts.map +1 -1
- package/dist/react-native/documents/VectorEmbeddingPolicy.js +4 -0
- package/dist/react-native/documents/VectorEmbeddingPolicy.js.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/MaxAggregator.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/MaxAggregator.js +4 -0
- package/dist/react-native/queryExecutionContext/Aggregators/MaxAggregator.js.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/MinAggregator.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/MinAggregator.js +4 -0
- package/dist/react-native/queryExecutionContext/Aggregators/MinAggregator.js.map +1 -1
- 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/request/RequestHandler.d.ts.map +1 -1
- package/dist/react-native/request/RequestHandler.js +10 -4
- package/dist/react-native/request/RequestHandler.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 +23 -22
|
@@ -4,12 +4,16 @@ import { OrderByEndpointComponent } from "./EndpointComponent/OrderByEndpointCom
|
|
|
4
4
|
import { OrderedDistinctEndpointComponent } from "./EndpointComponent/OrderedDistinctEndpointComponent.js";
|
|
5
5
|
import { UnorderedDistinctEndpointComponent } from "./EndpointComponent/UnorderedDistinctEndpointComponent.js";
|
|
6
6
|
import { GroupByEndpointComponent } from "./EndpointComponent/GroupByEndpointComponent.js";
|
|
7
|
-
import { getInitialHeader, mergeHeaders } from "./headerUtils.js";
|
|
8
7
|
import { OrderByQueryExecutionContext } from "./orderByQueryExecutionContext.js";
|
|
9
8
|
import { ParallelQueryExecutionContext } from "./parallelQueryExecutionContext.js";
|
|
10
9
|
import { GroupByValueEndpointComponent } from "./EndpointComponent/GroupByValueEndpointComponent.js";
|
|
11
10
|
import { NonStreamingOrderByDistinctEndpointComponent } from "./EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js";
|
|
12
11
|
import { NonStreamingOrderByEndpointComponent } from "./EndpointComponent/NonStreamingOrderByEndpointComponent.js";
|
|
12
|
+
import { rejectContinuationTokenForUnsupportedQueries, QueryTypes, } from "./QueryValidationHelper.js";
|
|
13
|
+
import { parseContinuationTokenFields } from "./ContinuationTokenParser.js";
|
|
14
|
+
import { LegacyFetchImplementation } from "./LegacyFetchImplementation.js";
|
|
15
|
+
import { QueryControlFetchImplementation } from "./QueryControlFetchImplementation.js";
|
|
16
|
+
import { QueryExecution } from "../common/constants.js";
|
|
13
17
|
/** @hidden */
|
|
14
18
|
export class PipelinedQueryExecutionContext {
|
|
15
19
|
clientContext;
|
|
@@ -19,13 +23,8 @@ export class PipelinedQueryExecutionContext {
|
|
|
19
23
|
partitionedQueryExecutionInfo;
|
|
20
24
|
emitRawOrderByPayload;
|
|
21
25
|
fetchBuffer;
|
|
22
|
-
fetchMoreRespHeaders;
|
|
23
26
|
endpoint;
|
|
24
|
-
|
|
25
|
-
vectorSearchBufferSize = 0;
|
|
26
|
-
static DEFAULT_PAGE_SIZE = 10;
|
|
27
|
-
static DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE = 50000;
|
|
28
|
-
nonStreamingOrderBy = false;
|
|
27
|
+
fetchImplementation;
|
|
29
28
|
constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo, correlatedActivityId, emitRawOrderByPayload = false) {
|
|
30
29
|
this.clientContext = clientContext;
|
|
31
30
|
this.collectionLink = collectionLink;
|
|
@@ -33,131 +32,161 @@ export class PipelinedQueryExecutionContext {
|
|
|
33
32
|
this.options = options;
|
|
34
33
|
this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;
|
|
35
34
|
this.emitRawOrderByPayload = emitRawOrderByPayload;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// Pick between Nonstreaming and streaming endpoints
|
|
42
|
-
this.nonStreamingOrderBy = partitionedQueryExecutionInfo.queryInfo.hasNonStreamingOrderBy;
|
|
43
|
-
// Pick between parallel vs order by execution context
|
|
44
|
-
const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy;
|
|
45
|
-
// TODO: Currently we don't get any field from backend to determine streaming queries
|
|
46
|
-
if (this.nonStreamingOrderBy) {
|
|
47
|
-
if (!options.allowUnboundedNonStreamingQueries) {
|
|
48
|
-
this.checkQueryConstraints(partitionedQueryExecutionInfo.queryInfo);
|
|
49
|
-
}
|
|
50
|
-
this.vectorSearchBufferSize = this.calculateVectorSearchBufferSize(partitionedQueryExecutionInfo.queryInfo, options);
|
|
51
|
-
const maxBufferSize = options["vectorSearchBufferSize"]
|
|
52
|
-
? options["vectorSearchBufferSize"]
|
|
53
|
-
: PipelinedQueryExecutionContext.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;
|
|
54
|
-
if (this.vectorSearchBufferSize > maxBufferSize) {
|
|
55
|
-
throw new ErrorResponse(`Executing a vector search query with TOP or OFFSET + LIMIT value ${this.vectorSearchBufferSize} larger than the vectorSearchBufferSize ${maxBufferSize} ` +
|
|
56
|
-
`is not allowed`);
|
|
57
|
-
}
|
|
58
|
-
const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
|
59
|
-
const context = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo, correlatedActivityId);
|
|
60
|
-
if (distinctType === "None") {
|
|
61
|
-
this.endpoint = new NonStreamingOrderByEndpointComponent(context, sortOrders, this.vectorSearchBufferSize, partitionedQueryExecutionInfo.queryInfo.offset, this.emitRawOrderByPayload);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.endpoint = new NonStreamingOrderByDistinctEndpointComponent(context, partitionedQueryExecutionInfo.queryInfo, this.vectorSearchBufferSize, this.emitRawOrderByPayload);
|
|
65
|
-
}
|
|
35
|
+
// Validate that queryInfo is present in partitioned query execution info
|
|
36
|
+
if (!partitionedQueryExecutionInfo.queryInfo) {
|
|
37
|
+
throw new ErrorResponse("Query execution requires valid query plan information. " +
|
|
38
|
+
"The partitioned query execution info is missing queryInfo. " +
|
|
39
|
+
"This may indicate an invalid query or a problem with query planning.");
|
|
66
40
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.endpoint = new GroupByValueEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo);
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
this.endpoint = new GroupByEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
// If distinct then add that to the pipeline
|
|
88
|
-
const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
|
89
|
-
if (distinctType === "Ordered") {
|
|
90
|
-
this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint);
|
|
91
|
-
}
|
|
92
|
-
if (distinctType === "Unordered") {
|
|
93
|
-
this.endpoint = new UnorderedDistinctEndpointComponent(this.endpoint);
|
|
94
|
-
}
|
|
95
|
-
// If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N
|
|
96
|
-
const top = partitionedQueryExecutionInfo.queryInfo.top;
|
|
97
|
-
if (typeof top === "number") {
|
|
98
|
-
this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top);
|
|
99
|
-
}
|
|
100
|
-
// If offset+limit then add that to the pipeline
|
|
101
|
-
const limit = partitionedQueryExecutionInfo.queryInfo.limit;
|
|
102
|
-
const offset = partitionedQueryExecutionInfo.queryInfo.offset;
|
|
103
|
-
if (typeof limit === "number" && typeof offset === "number") {
|
|
104
|
-
this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit);
|
|
105
|
-
}
|
|
41
|
+
if (!this.options.maxItemCount) {
|
|
42
|
+
this.options.maxItemCount = QueryExecution.DEFAULT_PAGE_SIZE;
|
|
43
|
+
}
|
|
44
|
+
const pageSize = this.options.maxItemCount;
|
|
45
|
+
// Extract query information and characteristics
|
|
46
|
+
const analyzedQueryInfo = this.analyzeQueryInfo(partitionedQueryExecutionInfo.queryInfo);
|
|
47
|
+
const { sortOrders, nonStreamingOrderBy, isOrderByQuery, isGroupByQuery, isUnorderedDistinctQuery, querySupportsTokens, } = analyzedQueryInfo;
|
|
48
|
+
// Reject continuation token usage for unsupported query types
|
|
49
|
+
if (!querySupportsTokens) {
|
|
50
|
+
rejectContinuationTokenForUnsupportedQueries(this.options.continuationToken, [
|
|
51
|
+
QueryTypes.nonStreamingOrderBy(nonStreamingOrderBy),
|
|
52
|
+
QueryTypes.groupBy(isGroupByQuery),
|
|
53
|
+
QueryTypes.unorderedDistinct(isUnorderedDistinctQuery),
|
|
54
|
+
]);
|
|
106
55
|
}
|
|
56
|
+
// Parse continuation token fields once for reuse in pipeline construction
|
|
57
|
+
const queryContinuationFields = this.options.continuationToken
|
|
58
|
+
? parseContinuationTokenFields(this.options.continuationToken)
|
|
59
|
+
: undefined;
|
|
60
|
+
// Pick between non-streaming vs streaming execution context
|
|
61
|
+
this.endpoint = nonStreamingOrderBy
|
|
62
|
+
? this.createNonStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, options)
|
|
63
|
+
: this.createStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, isGroupByQuery, queryContinuationFields);
|
|
107
64
|
this.fetchBuffer = [];
|
|
65
|
+
// Initialize the appropriate fetch implementation based on enableQueryControl
|
|
66
|
+
if (this.options.enableQueryControl) {
|
|
67
|
+
this.fetchImplementation = new QueryControlFetchImplementation(this.endpoint, pageSize, this.collectionLink, this.options.continuationToken, isOrderByQuery, querySupportsTokens);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.fetchImplementation = new LegacyFetchImplementation(this.endpoint, pageSize);
|
|
71
|
+
}
|
|
108
72
|
}
|
|
109
73
|
hasMoreResults() {
|
|
110
74
|
return this.fetchBuffer.length !== 0 || this.endpoint.hasMoreResults();
|
|
111
75
|
}
|
|
112
76
|
async fetchMore(diagnosticNode) {
|
|
113
|
-
this.
|
|
114
|
-
return this._fetchMoreImplementation(diagnosticNode);
|
|
77
|
+
return this.fetchImplementation.fetchMore(diagnosticNode, this.fetchBuffer);
|
|
115
78
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Creates a non-streaming endpoint for vector search and similar queries that require buffering
|
|
81
|
+
*/
|
|
82
|
+
createNonStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, options) {
|
|
83
|
+
const queryInfo = partitionedQueryExecutionInfo.queryInfo; // Safe to use ! after validation in constructor
|
|
84
|
+
if (!options.allowUnboundedNonStreamingQueries) {
|
|
85
|
+
this.checkQueryConstraints(queryInfo);
|
|
86
|
+
}
|
|
87
|
+
const vectorSearchBufferSize = this.calculateVectorSearchBufferSize(queryInfo, options);
|
|
88
|
+
this.validateVectorSearchBufferSize(vectorSearchBufferSize, options);
|
|
89
|
+
const baseContext = new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo, correlatedActivityId);
|
|
90
|
+
return this.wrapWithNonStreamingComponent(baseContext, queryInfo, sortOrders, vectorSearchBufferSize);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Creates a streaming endpoint with proper pipeline components
|
|
94
|
+
*/
|
|
95
|
+
createStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, isGroupByQuery, queryContinuationFields) {
|
|
96
|
+
const queryInfo = partitionedQueryExecutionInfo.queryInfo; // Safe to use ! after validation in constructor
|
|
97
|
+
// Create base execution context
|
|
98
|
+
let endpoint = this.createBaseExecutionContext(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId);
|
|
99
|
+
// Apply pipeline transformations
|
|
100
|
+
endpoint = this.applyGroupByComponents(endpoint, queryInfo, isGroupByQuery);
|
|
101
|
+
endpoint = this.applyDistinctComponents(endpoint, queryInfo, queryContinuationFields);
|
|
102
|
+
endpoint = this.applyLimitComponents(endpoint, queryInfo, queryContinuationFields);
|
|
103
|
+
return endpoint;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Creates the base execution context (OrderBy or Parallel)
|
|
107
|
+
*/
|
|
108
|
+
createBaseExecutionContext(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId) {
|
|
109
|
+
if (Array.isArray(sortOrders) && sortOrders.length > 0) {
|
|
110
|
+
// OrderBy queries need special wrapping for payload structure
|
|
111
|
+
return new OrderByEndpointComponent(new OrderByQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, partitionedQueryExecutionInfo, correlatedActivityId), this.emitRawOrderByPayload);
|
|
112
|
+
}
|
|
113
|
+
// Parallel queries
|
|
114
|
+
return new ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, partitionedQueryExecutionInfo, correlatedActivityId);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Wraps base context with appropriate non-streaming component
|
|
118
|
+
*/
|
|
119
|
+
wrapWithNonStreamingComponent(baseContext, queryInfo, sortOrders, vectorSearchBufferSize) {
|
|
120
|
+
const distinctType = queryInfo.distinctType;
|
|
121
|
+
if (distinctType === "None") {
|
|
122
|
+
return new NonStreamingOrderByEndpointComponent(baseContext, sortOrders, vectorSearchBufferSize, queryInfo.offset, this.emitRawOrderByPayload);
|
|
123
|
+
}
|
|
124
|
+
return new NonStreamingOrderByDistinctEndpointComponent(baseContext, queryInfo, vectorSearchBufferSize, this.emitRawOrderByPayload);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Applies GROUP BY components to the pipeline if needed
|
|
128
|
+
*/
|
|
129
|
+
applyGroupByComponents(endpoint, queryInfo, isGroupByQuery) {
|
|
130
|
+
if (!isGroupByQuery) {
|
|
131
|
+
return endpoint;
|
|
132
|
+
}
|
|
133
|
+
return queryInfo.hasSelectValue
|
|
134
|
+
? new GroupByValueEndpointComponent(endpoint, queryInfo)
|
|
135
|
+
: new GroupByEndpointComponent(endpoint, queryInfo);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Applies DISTINCT components to the pipeline if needed
|
|
139
|
+
*/
|
|
140
|
+
applyDistinctComponents(endpoint, queryInfo, queryContinuationFields) {
|
|
141
|
+
const distinctType = queryInfo.distinctType;
|
|
142
|
+
if (distinctType === "Ordered") {
|
|
143
|
+
const lastHash = queryContinuationFields?.hashedLastResult;
|
|
144
|
+
return new OrderedDistinctEndpointComponent(endpoint, lastHash);
|
|
145
|
+
}
|
|
146
|
+
if (distinctType === "Unordered") {
|
|
147
|
+
return new UnorderedDistinctEndpointComponent(endpoint);
|
|
148
|
+
}
|
|
149
|
+
return endpoint;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Applies TOP and OFFSET+LIMIT components to the pipeline if needed
|
|
153
|
+
*/
|
|
154
|
+
applyLimitComponents(endpoint, queryInfo, queryContinuationFields) {
|
|
155
|
+
// Apply TOP component (TOP N is effectively OFFSET 0 LIMIT N)
|
|
156
|
+
let top = queryInfo.top;
|
|
157
|
+
if (typeof top === "number") {
|
|
158
|
+
if (queryContinuationFields?.limit !== undefined) {
|
|
159
|
+
top = queryContinuationFields.limit;
|
|
152
160
|
}
|
|
161
|
+
endpoint = new OffsetLimitEndpointComponent(endpoint, 0, top);
|
|
153
162
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
163
|
+
// Apply OFFSET+LIMIT component
|
|
164
|
+
let limit = queryInfo.limit;
|
|
165
|
+
let offset = queryInfo.offset;
|
|
166
|
+
if (queryContinuationFields) {
|
|
167
|
+
if (queryContinuationFields.limit !== undefined) {
|
|
168
|
+
limit = queryContinuationFields.limit;
|
|
169
|
+
}
|
|
170
|
+
if (queryContinuationFields.offset !== undefined) {
|
|
171
|
+
offset = queryContinuationFields.offset;
|
|
159
172
|
}
|
|
160
173
|
}
|
|
174
|
+
if (typeof limit === "number" && typeof offset === "number") {
|
|
175
|
+
endpoint = new OffsetLimitEndpointComponent(endpoint, offset, limit);
|
|
176
|
+
}
|
|
177
|
+
return endpoint;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Validates vector search buffer size constraints
|
|
181
|
+
*/
|
|
182
|
+
validateVectorSearchBufferSize(vectorSearchBufferSize, options) {
|
|
183
|
+
const maxBufferSize = options["vectorSearchBufferSize"]
|
|
184
|
+
? options["vectorSearchBufferSize"]
|
|
185
|
+
: QueryExecution.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;
|
|
186
|
+
if (vectorSearchBufferSize > maxBufferSize) {
|
|
187
|
+
throw new ErrorResponse(`Executing a vector search query with TOP or OFFSET + LIMIT value ${vectorSearchBufferSize} larger than the vectorSearchBufferSize ${maxBufferSize} ` +
|
|
188
|
+
`is not allowed`);
|
|
189
|
+
}
|
|
161
190
|
}
|
|
162
191
|
calculateVectorSearchBufferSize(queryInfo, options) {
|
|
163
192
|
if (queryInfo.top === 0 || queryInfo.limit === 0)
|
|
@@ -168,7 +197,7 @@ export class PipelinedQueryExecutionContext {
|
|
|
168
197
|
? queryInfo.offset + queryInfo.limit
|
|
169
198
|
: options["vectorSearchBufferSize"] && options["vectorSearchBufferSize"] > 0
|
|
170
199
|
? options["vectorSearchBufferSize"]
|
|
171
|
-
:
|
|
200
|
+
: QueryExecution.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;
|
|
172
201
|
}
|
|
173
202
|
checkQueryConstraints(queryInfo) {
|
|
174
203
|
const hasTop = queryInfo.top || queryInfo.top === 0;
|
|
@@ -180,5 +209,29 @@ export class PipelinedQueryExecutionContext {
|
|
|
180
209
|
}
|
|
181
210
|
return;
|
|
182
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Analyzes query information and extracts key characteristics for query execution planning
|
|
214
|
+
*/
|
|
215
|
+
analyzeQueryInfo(queryInfo) {
|
|
216
|
+
const sortOrders = queryInfo.orderBy;
|
|
217
|
+
const nonStreamingOrderBy = queryInfo.hasNonStreamingOrderBy;
|
|
218
|
+
const isOrderByQuery = Array.isArray(sortOrders) && sortOrders.length > 0;
|
|
219
|
+
// Check if this is a GROUP BY query
|
|
220
|
+
const isGroupByQuery = Object.keys(queryInfo.groupByAliasToAggregateType || {}).length > 0 ||
|
|
221
|
+
(queryInfo.aggregates?.length || 0) > 0 ||
|
|
222
|
+
(queryInfo.groupByExpressions?.length || 0) > 0;
|
|
223
|
+
// Check if this is an unordered DISTINCT query
|
|
224
|
+
const isUnorderedDistinctQuery = queryInfo.distinctType === "Unordered";
|
|
225
|
+
// Determine if this query type supports continuation tokens
|
|
226
|
+
const querySupportsTokens = !isUnorderedDistinctQuery && !isGroupByQuery && !nonStreamingOrderBy;
|
|
227
|
+
return {
|
|
228
|
+
sortOrders,
|
|
229
|
+
nonStreamingOrderBy,
|
|
230
|
+
isOrderByQuery,
|
|
231
|
+
isGroupByQuery,
|
|
232
|
+
isUnorderedDistinctQuery,
|
|
233
|
+
querySupportsTokens,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
183
236
|
}
|
|
184
237
|
//# sourceMappingURL=pipelinedQueryExecutionContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelinedQueryExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/pipelinedQueryExecutionContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,yDAAyD,CAAC;AAC3G,OAAO,EAAE,kCAAkC,E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AAC;IACH,CAAC;IAEO,+BAA+B,CAAC,SAAoB,EAAE,OAAoB;QAChF,IAAI,SAAS,CAAC,GAAG,KAAK,CAAC,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC;YAAE,OAAO,CAAC,CAAC;QAC3D,OAAO,SAAS,CAAC,GAAG;YAClB,CAAC,CAAC,SAAS,CAAC,GAAG;YACf,CAAC,CAAC,SAAS,CAAC,KAAK;gBACf,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,KAAK;gBACpC,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC,IAAI,OAAO,CAAC,wBAAwB,CAAC,GAAG,CAAC;oBAC1E,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC;oBACnC,CAAC,CAAC,8BAA8B,CAAC,qCAAqC,CAAC;IAC/E,CAAC;IAEO,qBAAqB,CAAC,SAAoB;QAChD,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,IAAI,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACzB,MAAM,IAAI,aAAa,CACrB,gGAAgG;gBAC9F,6FAA6F;gBAC7F,gCAAgC,CACnC,CAAC;QACJ,CAAC;QACD,OAAO;IACT,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { ClientContext } from \"../ClientContext.js\";\nimport type { Response, FeedOptions } from \"../request/index.js\";\nimport type { PartitionedQueryExecutionInfo, QueryInfo } from \"../request/ErrorResponse.js\";\nimport { ErrorResponse } from \"../request/ErrorResponse.js\";\nimport type { CosmosHeaders } from \"./CosmosHeaders.js\";\nimport { OffsetLimitEndpointComponent } from \"./EndpointComponent/OffsetLimitEndpointComponent.js\";\nimport { OrderByEndpointComponent } from \"./EndpointComponent/OrderByEndpointComponent.js\";\nimport { OrderedDistinctEndpointComponent } from \"./EndpointComponent/OrderedDistinctEndpointComponent.js\";\nimport { UnorderedDistinctEndpointComponent } from \"./EndpointComponent/UnorderedDistinctEndpointComponent.js\";\nimport { GroupByEndpointComponent } from \"./EndpointComponent/GroupByEndpointComponent.js\";\nimport type { ExecutionContext } from \"./ExecutionContext.js\";\nimport { getInitialHeader, mergeHeaders } from \"./headerUtils.js\";\nimport { OrderByQueryExecutionContext } from \"./orderByQueryExecutionContext.js\";\nimport { ParallelQueryExecutionContext } from \"./parallelQueryExecutionContext.js\";\nimport { GroupByValueEndpointComponent } from \"./EndpointComponent/GroupByValueEndpointComponent.js\";\nimport type { SqlQuerySpec } from \"./SqlQuerySpec.js\";\nimport type { DiagnosticNodeInternal } from \"../diagnostics/DiagnosticNodeInternal.js\";\nimport { NonStreamingOrderByDistinctEndpointComponent } from \"./EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js\";\nimport { NonStreamingOrderByEndpointComponent } from \"./EndpointComponent/NonStreamingOrderByEndpointComponent.js\";\n\n/** @hidden */\nexport class PipelinedQueryExecutionContext implements ExecutionContext {\n private fetchBuffer: any[];\n private fetchMoreRespHeaders: CosmosHeaders;\n private endpoint: ExecutionContext;\n private pageSize: number;\n private vectorSearchBufferSize: number = 0;\n private static DEFAULT_PAGE_SIZE = 10;\n private static DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE = 50000;\n private nonStreamingOrderBy = false;\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 correlatedActivityId: string,\n private emitRawOrderByPayload: boolean = false,\n ) {\n this.endpoint = null;\n this.pageSize = options[\"maxItemCount\"];\n if (this.pageSize === undefined) {\n this.pageSize = PipelinedQueryExecutionContext.DEFAULT_PAGE_SIZE;\n }\n // Pick between Nonstreaming and streaming endpoints\n this.nonStreamingOrderBy = partitionedQueryExecutionInfo.queryInfo.hasNonStreamingOrderBy;\n\n // Pick between parallel vs order by execution context\n const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy;\n // TODO: Currently we don't get any field from backend to determine streaming queries\n if (this.nonStreamingOrderBy) {\n if (!options.allowUnboundedNonStreamingQueries) {\n this.checkQueryConstraints(partitionedQueryExecutionInfo.queryInfo);\n }\n\n this.vectorSearchBufferSize = this.calculateVectorSearchBufferSize(\n partitionedQueryExecutionInfo.queryInfo,\n options,\n );\n const maxBufferSize = options[\"vectorSearchBufferSize\"]\n ? options[\"vectorSearchBufferSize\"]\n : PipelinedQueryExecutionContext.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;\n\n if (this.vectorSearchBufferSize > maxBufferSize) {\n throw new ErrorResponse(\n `Executing a vector search query with TOP or OFFSET + LIMIT value ${this.vectorSearchBufferSize} larger than the vectorSearchBufferSize ${maxBufferSize} ` +\n `is not allowed`,\n );\n }\n\n const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;\n const context: ExecutionContext = new ParallelQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo,\n correlatedActivityId,\n );\n\n if (distinctType === \"None\") {\n this.endpoint = new NonStreamingOrderByEndpointComponent(\n context,\n sortOrders,\n this.vectorSearchBufferSize,\n partitionedQueryExecutionInfo.queryInfo.offset,\n this.emitRawOrderByPayload,\n );\n } else {\n this.endpoint = new NonStreamingOrderByDistinctEndpointComponent(\n context,\n partitionedQueryExecutionInfo.queryInfo,\n this.vectorSearchBufferSize,\n this.emitRawOrderByPayload,\n );\n }\n } else {\n if (Array.isArray(sortOrders) && sortOrders.length > 0) {\n // Need to wrap orderby execution context in endpoint component, since the data is nested as a \\\n // \"payload\" property.\n this.endpoint = new OrderByEndpointComponent(\n new OrderByQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo,\n correlatedActivityId,\n ),\n this.emitRawOrderByPayload,\n );\n } else {\n this.endpoint = new ParallelQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo,\n correlatedActivityId,\n );\n }\n if (\n Object.keys(partitionedQueryExecutionInfo.queryInfo.groupByAliasToAggregateType).length >\n 0 ||\n partitionedQueryExecutionInfo.queryInfo.aggregates.length > 0 ||\n partitionedQueryExecutionInfo.queryInfo.groupByExpressions.length > 0\n ) {\n if (partitionedQueryExecutionInfo.queryInfo.hasSelectValue) {\n this.endpoint = new GroupByValueEndpointComponent(\n this.endpoint,\n partitionedQueryExecutionInfo.queryInfo,\n );\n } else {\n this.endpoint = new GroupByEndpointComponent(\n this.endpoint,\n partitionedQueryExecutionInfo.queryInfo,\n );\n }\n }\n\n // If distinct then add that to the pipeline\n const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;\n if (distinctType === \"Ordered\") {\n this.endpoint = new OrderedDistinctEndpointComponent(this.endpoint);\n }\n if (distinctType === \"Unordered\") {\n this.endpoint = new UnorderedDistinctEndpointComponent(this.endpoint);\n }\n\n // If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N\n const top = partitionedQueryExecutionInfo.queryInfo.top;\n if (typeof top === \"number\") {\n this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, 0, top);\n }\n\n // If offset+limit then add that to the pipeline\n const limit = partitionedQueryExecutionInfo.queryInfo.limit;\n const offset = partitionedQueryExecutionInfo.queryInfo.offset;\n if (typeof limit === \"number\" && typeof offset === \"number\") {\n this.endpoint = new OffsetLimitEndpointComponent(this.endpoint, offset, limit);\n }\n }\n this.fetchBuffer = [];\n }\n\n public hasMoreResults(): boolean {\n return this.fetchBuffer.length !== 0 || this.endpoint.hasMoreResults();\n }\n\n public async fetchMore(diagnosticNode: DiagnosticNodeInternal): Promise<Response<any>> {\n this.fetchMoreRespHeaders = getInitialHeader();\n return this._fetchMoreImplementation(diagnosticNode);\n }\n\n private async _fetchMoreImplementation(\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<Response<any>> {\n try {\n if (this.fetchBuffer.length >= this.pageSize) {\n const temp = this.fetchBuffer.slice(0, this.pageSize);\n this.fetchBuffer = this.fetchBuffer.slice(this.pageSize);\n return { result: temp, headers: this.fetchMoreRespHeaders };\n } else {\n const response = await this.endpoint.fetchMore(diagnosticNode);\n mergeHeaders(this.fetchMoreRespHeaders, response.headers);\n if (response === undefined || response.result === undefined) {\n if (this.fetchBuffer.length > 0) {\n const temp = this.fetchBuffer;\n this.fetchBuffer = [];\n return { result: temp, headers: this.fetchMoreRespHeaders };\n } else {\n return { result: undefined, headers: this.fetchMoreRespHeaders };\n }\n }\n this.fetchBuffer.push(...response.result);\n\n if (this.options.enableQueryControl) {\n if (this.fetchBuffer.length >= this.pageSize) {\n const temp = this.fetchBuffer.slice(0, this.pageSize);\n this.fetchBuffer = this.fetchBuffer.slice(this.pageSize);\n return { result: temp, headers: this.fetchMoreRespHeaders };\n } else {\n const temp = this.fetchBuffer;\n this.fetchBuffer = [];\n return { result: temp, headers: this.fetchMoreRespHeaders };\n }\n }\n // Recursively fetch more results to ensure the pageSize number of results are returned\n // to maintain compatibility with the previous implementation\n return this._fetchMoreImplementation(diagnosticNode);\n }\n } catch (err: any) {\n mergeHeaders(this.fetchMoreRespHeaders, err.headers);\n err.headers = this.fetchMoreRespHeaders;\n if (err) {\n throw err;\n }\n }\n }\n\n private calculateVectorSearchBufferSize(queryInfo: QueryInfo, options: FeedOptions): number {\n if (queryInfo.top === 0 || queryInfo.limit === 0) return 0;\n return queryInfo.top\n ? queryInfo.top\n : queryInfo.limit\n ? queryInfo.offset + queryInfo.limit\n : options[\"vectorSearchBufferSize\"] && options[\"vectorSearchBufferSize\"] > 0\n ? options[\"vectorSearchBufferSize\"]\n : PipelinedQueryExecutionContext.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;\n }\n\n private checkQueryConstraints(queryInfo: QueryInfo): void {\n const hasTop = queryInfo.top || queryInfo.top === 0;\n const hasLimit = queryInfo.limit || queryInfo.limit === 0;\n if (!hasTop && !hasLimit) {\n throw new ErrorResponse(\n \"Executing a non-streaming search query without TOP or LIMIT can consume a large number of RUs \" +\n \"very fast and have long runtimes. Please ensure you are using one of the above two filters \" +\n \"with your vector search query.\",\n );\n }\n return;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pipelinedQueryExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/pipelinedQueryExecutionContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,yDAAyD,CAAC;AAC3G,OAAO,EAAE,kCAAkC,EAAE,MAAM,2DAA2D,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAE3F,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAGrG,OAAO,EAAE,4CAA4C,EAAE,MAAM,qEAAqE,CAAC;AACnI,OAAO,EAAE,oCAAoC,EAAE,MAAM,6DAA6D,CAAC;AACnH,OAAO,EACL,4CAA4C,EAC5C,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,cAAc;AACd,MAAM,OAAO,8BAA8B;IAM/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../ClientContext.js\";\nimport type { Response, FeedOptions } from \"../request/index.js\";\nimport type { PartitionedQueryExecutionInfo, QueryInfo } from \"../request/ErrorResponse.js\";\nimport { ErrorResponse } from \"../request/ErrorResponse.js\";\nimport { OffsetLimitEndpointComponent } from \"./EndpointComponent/OffsetLimitEndpointComponent.js\";\nimport { OrderByEndpointComponent } from \"./EndpointComponent/OrderByEndpointComponent.js\";\nimport { OrderedDistinctEndpointComponent } from \"./EndpointComponent/OrderedDistinctEndpointComponent.js\";\nimport { UnorderedDistinctEndpointComponent } from \"./EndpointComponent/UnorderedDistinctEndpointComponent.js\";\nimport { GroupByEndpointComponent } from \"./EndpointComponent/GroupByEndpointComponent.js\";\nimport type { ExecutionContext } from \"./ExecutionContext.js\";\nimport { OrderByQueryExecutionContext } from \"./orderByQueryExecutionContext.js\";\nimport { ParallelQueryExecutionContext } from \"./parallelQueryExecutionContext.js\";\nimport { GroupByValueEndpointComponent } from \"./EndpointComponent/GroupByValueEndpointComponent.js\";\nimport type { SqlQuerySpec } from \"./SqlQuerySpec.js\";\nimport type { DiagnosticNodeInternal } from \"../diagnostics/DiagnosticNodeInternal.js\";\nimport { NonStreamingOrderByDistinctEndpointComponent } from \"./EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js\";\nimport { NonStreamingOrderByEndpointComponent } from \"./EndpointComponent/NonStreamingOrderByEndpointComponent.js\";\nimport {\n rejectContinuationTokenForUnsupportedQueries,\n QueryTypes,\n} from \"./QueryValidationHelper.js\";\nimport { parseContinuationTokenFields } from \"./ContinuationTokenParser.js\";\nimport { LegacyFetchImplementation } from \"./LegacyFetchImplementation.js\";\nimport { QueryControlFetchImplementation } from \"./QueryControlFetchImplementation.js\";\nimport { QueryExecution } from \"../common/constants.js\";\n\n/** @hidden */\nexport class PipelinedQueryExecutionContext implements ExecutionContext {\n private fetchBuffer: any[];\n private endpoint: ExecutionContext;\n private readonly fetchImplementation: LegacyFetchImplementation | QueryControlFetchImplementation;\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 correlatedActivityId: string,\n private emitRawOrderByPayload: boolean = false,\n ) {\n // Validate that queryInfo is present in partitioned query execution info\n if (!partitionedQueryExecutionInfo.queryInfo) {\n throw new ErrorResponse(\n \"Query execution requires valid query plan information. \" +\n \"The partitioned query execution info is missing queryInfo. \" +\n \"This may indicate an invalid query or a problem with query planning.\",\n );\n }\n\n if (!this.options.maxItemCount) {\n this.options.maxItemCount = QueryExecution.DEFAULT_PAGE_SIZE;\n }\n const pageSize = this.options.maxItemCount;\n\n // Extract query information and characteristics\n const analyzedQueryInfo = this.analyzeQueryInfo(partitionedQueryExecutionInfo.queryInfo);\n const {\n sortOrders,\n nonStreamingOrderBy,\n isOrderByQuery,\n isGroupByQuery,\n isUnorderedDistinctQuery,\n querySupportsTokens,\n } = analyzedQueryInfo;\n\n // Reject continuation token usage for unsupported query types\n if (!querySupportsTokens) {\n rejectContinuationTokenForUnsupportedQueries(this.options.continuationToken, [\n QueryTypes.nonStreamingOrderBy(nonStreamingOrderBy),\n QueryTypes.groupBy(isGroupByQuery),\n QueryTypes.unorderedDistinct(isUnorderedDistinctQuery),\n ]);\n }\n\n // Parse continuation token fields once for reuse in pipeline construction\n const queryContinuationFields = this.options.continuationToken\n ? parseContinuationTokenFields(this.options.continuationToken)\n : undefined;\n\n // Pick between non-streaming vs streaming execution context\n this.endpoint = nonStreamingOrderBy\n ? this.createNonStreamingEndpoint(\n partitionedQueryExecutionInfo,\n sortOrders,\n correlatedActivityId,\n options,\n )\n : this.createStreamingEndpoint(\n partitionedQueryExecutionInfo,\n sortOrders,\n correlatedActivityId,\n isGroupByQuery,\n queryContinuationFields,\n );\n this.fetchBuffer = [];\n // Initialize the appropriate fetch implementation based on enableQueryControl\n if (this.options.enableQueryControl) {\n this.fetchImplementation = new QueryControlFetchImplementation(\n this.endpoint,\n pageSize,\n this.collectionLink,\n this.options.continuationToken,\n isOrderByQuery,\n querySupportsTokens,\n );\n } else {\n this.fetchImplementation = new LegacyFetchImplementation(this.endpoint, pageSize);\n }\n }\n\n public hasMoreResults(): boolean {\n return this.fetchBuffer.length !== 0 || this.endpoint.hasMoreResults();\n }\n\n public async fetchMore(diagnosticNode: DiagnosticNodeInternal): Promise<Response<any>> {\n return this.fetchImplementation.fetchMore(diagnosticNode, this.fetchBuffer);\n }\n\n /**\n * Creates a non-streaming endpoint for vector search and similar queries that require buffering\n */\n private createNonStreamingEndpoint(\n partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo,\n sortOrders: any[],\n correlatedActivityId: string,\n options: FeedOptions,\n ): ExecutionContext {\n const queryInfo = partitionedQueryExecutionInfo.queryInfo!; // Safe to use ! after validation in constructor\n\n if (!options.allowUnboundedNonStreamingQueries) {\n this.checkQueryConstraints(queryInfo);\n }\n\n const vectorSearchBufferSize = this.calculateVectorSearchBufferSize(queryInfo, options);\n\n this.validateVectorSearchBufferSize(vectorSearchBufferSize, options);\n\n const baseContext = new ParallelQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n this.partitionedQueryExecutionInfo,\n correlatedActivityId,\n );\n\n return this.wrapWithNonStreamingComponent(\n baseContext,\n queryInfo,\n sortOrders,\n vectorSearchBufferSize,\n );\n }\n\n /**\n * Creates a streaming endpoint with proper pipeline components\n */\n private createStreamingEndpoint(\n partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo,\n sortOrders: any[],\n correlatedActivityId: string,\n isGroupByQuery: boolean,\n queryContinuationFields: any,\n ): ExecutionContext {\n const queryInfo = partitionedQueryExecutionInfo.queryInfo!; // Safe to use ! after validation in constructor\n\n // Create base execution context\n let endpoint = this.createBaseExecutionContext(\n partitionedQueryExecutionInfo,\n sortOrders,\n correlatedActivityId,\n );\n\n // Apply pipeline transformations\n endpoint = this.applyGroupByComponents(endpoint, queryInfo, isGroupByQuery);\n endpoint = this.applyDistinctComponents(endpoint, queryInfo, queryContinuationFields);\n endpoint = this.applyLimitComponents(endpoint, queryInfo, queryContinuationFields);\n\n return endpoint;\n }\n\n /**\n * Creates the base execution context (OrderBy or Parallel)\n */\n private createBaseExecutionContext(\n partitionedQueryExecutionInfo: PartitionedQueryExecutionInfo,\n sortOrders: any[],\n correlatedActivityId: string,\n ): ExecutionContext {\n if (Array.isArray(sortOrders) && sortOrders.length > 0) {\n // OrderBy queries need special wrapping for payload structure\n return new OrderByEndpointComponent(\n new OrderByQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n partitionedQueryExecutionInfo,\n correlatedActivityId,\n ),\n this.emitRawOrderByPayload,\n );\n }\n\n // Parallel queries\n return new ParallelQueryExecutionContext(\n this.clientContext,\n this.collectionLink,\n this.query,\n this.options,\n partitionedQueryExecutionInfo,\n correlatedActivityId,\n );\n }\n\n /**\n * Wraps base context with appropriate non-streaming component\n */\n private wrapWithNonStreamingComponent(\n baseContext: ExecutionContext,\n queryInfo: QueryInfo,\n sortOrders: any[],\n vectorSearchBufferSize: number,\n ): ExecutionContext {\n const distinctType = queryInfo.distinctType;\n\n if (distinctType === \"None\") {\n return new NonStreamingOrderByEndpointComponent(\n baseContext,\n sortOrders,\n vectorSearchBufferSize,\n queryInfo.offset,\n this.emitRawOrderByPayload,\n );\n }\n\n return new NonStreamingOrderByDistinctEndpointComponent(\n baseContext,\n queryInfo,\n vectorSearchBufferSize,\n this.emitRawOrderByPayload,\n );\n }\n\n /**\n * Applies GROUP BY components to the pipeline if needed\n */\n private applyGroupByComponents(\n endpoint: ExecutionContext,\n queryInfo: QueryInfo,\n isGroupByQuery: boolean,\n ): ExecutionContext {\n if (!isGroupByQuery) {\n return endpoint;\n }\n\n return queryInfo.hasSelectValue\n ? new GroupByValueEndpointComponent(endpoint, queryInfo)\n : new GroupByEndpointComponent(endpoint, queryInfo);\n }\n\n /**\n * Applies DISTINCT components to the pipeline if needed\n */\n private applyDistinctComponents(\n endpoint: ExecutionContext,\n queryInfo: QueryInfo,\n queryContinuationFields: any,\n ): ExecutionContext {\n const distinctType = queryInfo.distinctType;\n\n if (distinctType === \"Ordered\") {\n const lastHash = queryContinuationFields?.hashedLastResult;\n return new OrderedDistinctEndpointComponent(endpoint, lastHash);\n }\n\n if (distinctType === \"Unordered\") {\n return new UnorderedDistinctEndpointComponent(endpoint);\n }\n\n return endpoint;\n }\n\n /**\n * Applies TOP and OFFSET+LIMIT components to the pipeline if needed\n */\n private applyLimitComponents(\n endpoint: ExecutionContext,\n queryInfo: QueryInfo,\n queryContinuationFields: any,\n ): ExecutionContext {\n // Apply TOP component (TOP N is effectively OFFSET 0 LIMIT N)\n let top = queryInfo.top;\n if (typeof top === \"number\") {\n if (queryContinuationFields?.limit !== undefined) {\n top = queryContinuationFields.limit;\n }\n endpoint = new OffsetLimitEndpointComponent(endpoint, 0, top);\n }\n\n // Apply OFFSET+LIMIT component\n let limit = queryInfo.limit;\n let offset = queryInfo.offset;\n\n if (queryContinuationFields) {\n if (queryContinuationFields.limit !== undefined) {\n limit = queryContinuationFields.limit;\n }\n if (queryContinuationFields.offset !== undefined) {\n offset = queryContinuationFields.offset;\n }\n }\n\n if (typeof limit === \"number\" && typeof offset === \"number\") {\n endpoint = new OffsetLimitEndpointComponent(endpoint, offset, limit);\n }\n\n return endpoint;\n }\n\n /**\n * Validates vector search buffer size constraints\n */\n private validateVectorSearchBufferSize(\n vectorSearchBufferSize: number,\n options: FeedOptions,\n ): void {\n const maxBufferSize = options[\"vectorSearchBufferSize\"]\n ? options[\"vectorSearchBufferSize\"]\n : QueryExecution.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;\n\n if (vectorSearchBufferSize > maxBufferSize) {\n throw new ErrorResponse(\n `Executing a vector search query with TOP or OFFSET + LIMIT value ${vectorSearchBufferSize} larger than the vectorSearchBufferSize ${maxBufferSize} ` +\n `is not allowed`,\n );\n }\n }\n\n private calculateVectorSearchBufferSize(queryInfo: QueryInfo, options: FeedOptions): number {\n if (queryInfo.top === 0 || queryInfo.limit === 0) return 0;\n return queryInfo.top\n ? queryInfo.top\n : queryInfo.limit\n ? queryInfo.offset + queryInfo.limit\n : options[\"vectorSearchBufferSize\"] && options[\"vectorSearchBufferSize\"] > 0\n ? options[\"vectorSearchBufferSize\"]\n : QueryExecution.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;\n }\n\n private checkQueryConstraints(queryInfo: QueryInfo): void {\n const hasTop = queryInfo.top || queryInfo.top === 0;\n const hasLimit = queryInfo.limit || queryInfo.limit === 0;\n if (!hasTop && !hasLimit) {\n throw new ErrorResponse(\n \"Executing a non-streaming search query without TOP or LIMIT can consume a large number of RUs \" +\n \"very fast and have long runtimes. Please ensure you are using one of the above two filters \" +\n \"with your vector search query.\",\n );\n }\n return;\n }\n\n /**\n * Analyzes query information and extracts key characteristics for query execution planning\n */\n private analyzeQueryInfo(queryInfo: QueryInfo) {\n const sortOrders = queryInfo.orderBy;\n const nonStreamingOrderBy = queryInfo.hasNonStreamingOrderBy;\n const isOrderByQuery = Array.isArray(sortOrders) && sortOrders.length > 0;\n\n // Check if this is a GROUP BY query\n const isGroupByQuery =\n Object.keys(queryInfo.groupByAliasToAggregateType || {}).length > 0 ||\n (queryInfo.aggregates?.length || 0) > 0 ||\n (queryInfo.groupByExpressions?.length || 0) > 0;\n\n // Check if this is an unordered DISTINCT query\n const isUnorderedDistinctQuery = queryInfo.distinctType === \"Unordered\";\n\n // Determine if this query type supports continuation tokens\n const querySupportsTokens =\n !isUnorderedDistinctQuery && !isGroupByQuery && !nonStreamingOrderBy;\n\n return {\n sortOrders,\n nonStreamingOrderBy,\n isOrderByQuery,\n isGroupByQuery,\n isUnorderedDistinctQuery,\n querySupportsTokens,\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the context for filtering, including the values from the continuation token.
|
|
3
|
+
*/
|
|
4
|
+
export interface FilterContext {
|
|
5
|
+
/**
|
|
6
|
+
* The _rid of the document from which the continuation token was created.
|
|
7
|
+
*/
|
|
8
|
+
rid: string;
|
|
9
|
+
/**
|
|
10
|
+
* The number of documents with the same _rid to skip, used in JOIN queries.
|
|
11
|
+
*/
|
|
12
|
+
skipCount: number;
|
|
13
|
+
/**
|
|
14
|
+
* The order by item values from the last document of the previous page.
|
|
15
|
+
*/
|
|
16
|
+
orderByItems: any[];
|
|
17
|
+
/**
|
|
18
|
+
* The sort orders for the ORDER BY fields ("Ascending" or "Descending").
|
|
19
|
+
*/
|
|
20
|
+
sortOrders: any[];
|
|
21
|
+
/**
|
|
22
|
+
* Query execution information from x-ms-cosmos-query-execution-info header.
|
|
23
|
+
*/
|
|
24
|
+
queryExecutionInfo?: {
|
|
25
|
+
reverseRidEnabled: boolean;
|
|
26
|
+
reverseIndexScan: boolean;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Defines the interface for a post-fetch query filter.
|
|
31
|
+
*/
|
|
32
|
+
export interface FilterStrategy {
|
|
33
|
+
/**
|
|
34
|
+
* Applies the filtering logic to a set of documents.
|
|
35
|
+
* @param documents - The documents to filter.
|
|
36
|
+
* @returns The filtered set of documents.
|
|
37
|
+
*/
|
|
38
|
+
applyFilter(documents: any[]): any[];
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=FilterStrategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterStrategy.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/queryFilteringStrategy/FilterStrategy.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,YAAY,EAAE,GAAG,EAAE,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB;;OAEG;IACH,kBAAkB,CAAC,EAAE;QACnB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,gBAAgB,EAAE,OAAO,CAAC;KAC3B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,WAAW,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterStrategy.js","sourceRoot":"","sources":["../../../../src/queryExecutionContext/queryFilteringStrategy/FilterStrategy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Represents the context for filtering, including the values from the continuation token.\n */\nexport interface FilterContext {\n /**\n * The _rid of the document from which the continuation token was created.\n */\n rid: string;\n /**\n * The number of documents with the same _rid to skip, used in JOIN queries.\n */\n skipCount: number;\n /**\n * The order by item values from the last document of the previous page.\n */\n orderByItems: any[];\n /**\n * The sort orders for the ORDER BY fields (\"Ascending\" or \"Descending\").\n */\n sortOrders: any[];\n /**\n * Query execution information from x-ms-cosmos-query-execution-info header.\n */\n queryExecutionInfo?: {\n reverseRidEnabled: boolean;\n reverseIndexScan: boolean;\n };\n}\n\n/**\n * Defines the interface for a post-fetch query filter.\n */\nexport interface FilterStrategy {\n /**\n * Applies the filtering logic to a set of documents.\n * @param documents - The documents to filter.\n * @returns The filtered set of documents.\n */\n applyFilter(documents: any[]): any[];\n}\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { PartitionKeyRange } from "../../index.js";
|
|
2
|
+
import type { TargetPartitionRangeStrategy, PartitionRangeFilterResult } from "./TargetPartitionRangeStrategy.js";
|
|
3
|
+
import type { PartitionRangeWithContinuationToken } from "./TargetPartitionRangeManager.js";
|
|
4
|
+
/**
|
|
5
|
+
* Strategy for filtering partition ranges in ORDER BY query execution context
|
|
6
|
+
* Supports resuming from continuation tokens with proper range-token pair management
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export declare class OrderByQueryRangeStrategy implements TargetPartitionRangeStrategy {
|
|
10
|
+
getStrategyType(): string;
|
|
11
|
+
filterPartitionRanges(targetRanges: PartitionKeyRange[], continuationRanges?: PartitionRangeWithContinuationToken[], queryInfo?: Record<string, unknown>): PartitionRangeFilterResult;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a filter condition for ranges based on ORDER BY items and sort orders
|
|
14
|
+
* This filter ensures that ranges only return documents based on their position relative to the continuation point
|
|
15
|
+
* @param orderByItems - Array of order by items from the continuation token
|
|
16
|
+
* @param queryInfo - Query information containing sort orders and other metadata
|
|
17
|
+
* @param rangePosition - Whether this is for "left" or "right" ranges relative to continuation point
|
|
18
|
+
* @returns SQL filter condition string for the specified range position
|
|
19
|
+
*/
|
|
20
|
+
private createRangeFilterCondition;
|
|
21
|
+
/**
|
|
22
|
+
* Extracts sort orders from query info
|
|
23
|
+
* @throws Error if sort order information is missing or invalid
|
|
24
|
+
*/
|
|
25
|
+
private extractSortOrders;
|
|
26
|
+
/**
|
|
27
|
+
* Extracts field path from ORDER BY expressions in query plan
|
|
28
|
+
* @throws Error if orderByExpressions are not found or index is out of bounds or expression format is invalid
|
|
29
|
+
*/
|
|
30
|
+
private extractFieldPath;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a comparison condition based on the field, value, sort order, and range position
|
|
33
|
+
*/
|
|
34
|
+
private createComparisonCondition;
|
|
35
|
+
/**
|
|
36
|
+
* Formats a value for use in SQL condition
|
|
37
|
+
*/
|
|
38
|
+
private formatValueForSQL;
|
|
39
|
+
/**
|
|
40
|
+
* Compares partition key range boundaries with proper handling for inclusive/exclusive semantics
|
|
41
|
+
* @param boundary1 - First boundary to compare
|
|
42
|
+
* @param boundary2 - Second boundary to compare
|
|
43
|
+
* @returns negative if boundary1 is less than boundary2, positive if boundary1 is greater than boundary2, 0 if equal
|
|
44
|
+
*/
|
|
45
|
+
private comparePartitionKeyBoundaries;
|
|
46
|
+
private isRangeBeforeAnother;
|
|
47
|
+
private isRangeAfterAnother;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=OrderByQueryRangeStrategy.d.ts.map
|
package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrderByQueryRangeStrategy.d.ts","sourceRoot":"","sources":["../../../../src/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EACV,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AAE5F;;;;GAIG;AACH,qBAAa,yBAA0B,YAAW,4BAA4B;IAC5E,eAAe,IAAI,MAAM;IAIzB,qBAAqB,CACnB,YAAY,EAAE,iBAAiB,EAAE,EACjC,kBAAkB,CAAC,EAAE,mCAAmC,EAAE,EAC1D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,0BAA0B;IAkG7B;;;;;;;OAOG;IACH,OAAO,CAAC,0BAA0B;IAkFlC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAyCzB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAyDxB;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAkCjC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAyBzB;;;;;OAKG;IACH,OAAO,CAAC,6BAA6B;IAUrC,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,mBAAmB;CAK5B"}
|