@azure/cosmos 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/common/constants.d.ts.map +1 -1
- package/dist/browser/common/constants.js +16 -1
- package/dist/browser/common/constants.js.map +1 -1
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.js +84 -0
- package/dist/browser/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.js +39 -0
- package/dist/browser/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.js +4 -0
- package/dist/browser/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +174 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +28 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +129 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +66 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.js +23 -0
- package/dist/browser/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/browser/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/browser/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/browser/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/browser/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/browser/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.js +55 -0
- package/dist/browser/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js +156 -0
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.js +105 -0
- package/dist/browser/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.js +93 -0
- package/dist/browser/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.js +65 -0
- package/dist/browser/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/browser/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/browser/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/documentProducer.js +17 -4
- package/dist/browser/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/browser/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/index.d.ts +7 -0
- package/dist/browser/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/index.js +4 -0
- package/dist/browser/queryExecutionContext/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/browser/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/browser/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/browser/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/orderByComparator.js +20 -3
- package/dist/browser/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/browser/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/browser/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/browser/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/parallelQueryResult.js +23 -0
- package/dist/browser/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/browser/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +4 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +310 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +102 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +180 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +93 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +4 -0
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +53 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +34 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +4 -0
- package/dist/browser/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.js +4 -0
- package/dist/browser/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/browser/queryIterator.js.map +1 -1
- package/dist/browser/utils/offers.d.ts.map +1 -1
- package/dist/browser/utils/offers.js +0 -1
- package/dist/browser/utils/offers.js.map +1 -1
- package/dist/commonjs/common/constants.d.ts.map +1 -1
- package/dist/commonjs/common/constants.js +13 -2
- package/dist/commonjs/common/constants.js.map +1 -1
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js +93 -0
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js +44 -0
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js +5 -0
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +178 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +31 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +133 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +70 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js +26 -0
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js +59 -0
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js +160 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js +109 -0
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js +97 -0
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js +69 -0
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/commonjs/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/documentProducer.js +17 -4
- package/dist/commonjs/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/index.d.ts +7 -0
- package/dist/commonjs/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/index.js +10 -0
- package/dist/commonjs/queryExecutionContext/index.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/commonjs/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByComparator.js +21 -3
- package/dist/commonjs/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js +26 -0
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +314 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +106 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +184 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +97 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +57 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +38 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js +5 -0
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/commonjs/queryIterator.js.map +1 -1
- package/dist/commonjs/utils/offers.d.ts.map +1 -1
- package/dist/commonjs/utils/offers.js +0 -1
- package/dist/commonjs/utils/offers.js.map +1 -1
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +16 -1
- package/dist/esm/common/constants.js.map +1 -1
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.js +84 -0
- package/dist/esm/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.js +39 -0
- package/dist/esm/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.js +4 -0
- package/dist/esm/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +174 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +28 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +129 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +66 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.js +23 -0
- package/dist/esm/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/esm/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/esm/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.js +55 -0
- package/dist/esm/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js +156 -0
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.js +105 -0
- package/dist/esm/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.js +93 -0
- package/dist/esm/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.js +65 -0
- package/dist/esm/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/esm/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/esm/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/documentProducer.js +17 -4
- package/dist/esm/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/esm/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/index.d.ts +7 -0
- package/dist/esm/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/index.js +4 -0
- package/dist/esm/queryExecutionContext/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/esm/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/esm/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/esm/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/orderByComparator.js +20 -3
- package/dist/esm/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/esm/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/esm/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/esm/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/parallelQueryResult.js +23 -0
- package/dist/esm/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/esm/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +4 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +310 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +102 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +180 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +93 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +4 -0
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +53 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +34 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +4 -0
- package/dist/esm/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.js +4 -0
- package/dist/esm/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/esm/queryIterator.js.map +1 -1
- package/dist/esm/utils/offers.d.ts.map +1 -1
- package/dist/esm/utils/offers.js +0 -1
- package/dist/esm/utils/offers.js.map +1 -1
- package/dist/react-native/common/constants.d.ts.map +1 -1
- package/dist/react-native/common/constants.js +16 -1
- package/dist/react-native/common/constants.js.map +1 -1
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts +99 -0
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.d.ts.map +1 -0
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.js +84 -0
- package/dist/react-native/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +1 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts +40 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.d.ts.map +1 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.js +39 -0
- package/dist/react-native/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +1 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.d.ts +21 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.d.ts.map +1 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.js +4 -0
- package/dist/react-native/documents/ContinuationToken/PartitionRangeUpdate.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +174 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +28 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +129 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +66 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.d.ts +2 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.js +23 -0
- package/dist/react-native/queryExecutionContext/ContinuationTokenParser.js.map +1 -0
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +22 -7
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +21 -5
- package/dist/react-native/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +28 -6
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +23 -7
- package/dist/react-native/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +35 -4
- package/dist/react-native/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts +1 -0
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +22 -4
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +24 -5
- package/dist/react-native/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +18 -5
- package/dist/react-native/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +1 -1
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.d.ts +14 -0
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.js +55 -0
- package/dist/react-native/queryExecutionContext/LegacyFetchImplementation.js.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts +73 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js +156 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.d.ts +19 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.js +105 -0
- package/dist/react-native/queryExecutionContext/PartitionRangeUtils.js.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.d.ts +20 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.js +93 -0
- package/dist/react-native/queryExecutionContext/QueryControlFetchImplementation.js.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.d.ts +9 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.js +65 -0
- package/dist/react-native/queryExecutionContext/QueryValidationHelper.js.map +1 -0
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.d.ts +2 -2
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.js +2 -1
- package/dist/react-native/queryExecutionContext/defaultQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/documentProducer.d.ts +9 -3
- package/dist/react-native/queryExecutionContext/documentProducer.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/documentProducer.js +17 -4
- package/dist/react-native/queryExecutionContext/documentProducer.js.map +1 -1
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.js +18 -13
- package/dist/react-native/queryExecutionContext/hybridQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/index.d.ts +7 -0
- package/dist/react-native/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/index.js +4 -0
- package/dist/react-native/queryExecutionContext/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/nonStreamingOrderByResult.d.ts +5 -1
- package/dist/react-native/queryExecutionContext/nonStreamingOrderByResult.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/nonStreamingOrderByResult.js.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByComparator.d.ts +11 -2
- package/dist/react-native/queryExecutionContext/orderByComparator.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByComparator.js +20 -3
- package/dist/react-native/queryExecutionContext/orderByComparator.js.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.d.ts +4 -0
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.js +18 -7
- package/dist/react-native/queryExecutionContext/orderByDocumentProducerComparator.js.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.d.ts +7 -10
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.js +30 -23
- package/dist/react-native/queryExecutionContext/orderByQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.d.ts +18 -10
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.js +47 -23
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +160 -26
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.js +453 -106
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryResult.d.ts +35 -0
- package/dist/react-native/queryExecutionContext/parallelQueryResult.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/parallelQueryResult.js +23 -0
- package/dist/react-native/queryExecutionContext/parallelQueryResult.js.map +1 -0
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.d.ts +37 -7
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.js +173 -120
- package/dist/react-native/queryExecutionContext/pipelinedQueryExecutionContext.js.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts +40 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +4 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +49 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +310 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +18 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +102 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts +51 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +180 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts +76 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +93 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts +30 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +4 -0
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts +29 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +53 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts +27 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +34 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts +36 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +4 -0
- package/dist/react-native/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +1 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.d.ts +22 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.d.ts.map +1 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.js +4 -0
- package/dist/react-native/queryExecutionContext/queryRangeMapping.js.map +1 -0
- package/dist/react-native/queryIterator.js.map +1 -1
- package/dist/react-native/utils/offers.d.ts.map +1 -1
- package/dist/react-native/utils/offers.js +0 -1
- package/dist/react-native/utils/offers.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,12 +7,16 @@ const OrderByEndpointComponent_js_1 = require("./EndpointComponent/OrderByEndpoi
|
|
|
7
7
|
const OrderedDistinctEndpointComponent_js_1 = require("./EndpointComponent/OrderedDistinctEndpointComponent.js");
|
|
8
8
|
const UnorderedDistinctEndpointComponent_js_1 = require("./EndpointComponent/UnorderedDistinctEndpointComponent.js");
|
|
9
9
|
const GroupByEndpointComponent_js_1 = require("./EndpointComponent/GroupByEndpointComponent.js");
|
|
10
|
-
const headerUtils_js_1 = require("./headerUtils.js");
|
|
11
10
|
const orderByQueryExecutionContext_js_1 = require("./orderByQueryExecutionContext.js");
|
|
12
11
|
const parallelQueryExecutionContext_js_1 = require("./parallelQueryExecutionContext.js");
|
|
13
12
|
const GroupByValueEndpointComponent_js_1 = require("./EndpointComponent/GroupByValueEndpointComponent.js");
|
|
14
13
|
const NonStreamingOrderByDistinctEndpointComponent_js_1 = require("./EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js");
|
|
15
14
|
const NonStreamingOrderByEndpointComponent_js_1 = require("./EndpointComponent/NonStreamingOrderByEndpointComponent.js");
|
|
15
|
+
const QueryValidationHelper_js_1 = require("./QueryValidationHelper.js");
|
|
16
|
+
const ContinuationTokenParser_js_1 = require("./ContinuationTokenParser.js");
|
|
17
|
+
const LegacyFetchImplementation_js_1 = require("./LegacyFetchImplementation.js");
|
|
18
|
+
const QueryControlFetchImplementation_js_1 = require("./QueryControlFetchImplementation.js");
|
|
19
|
+
const constants_js_1 = require("../common/constants.js");
|
|
16
20
|
/** @hidden */
|
|
17
21
|
class PipelinedQueryExecutionContext {
|
|
18
22
|
clientContext;
|
|
@@ -22,13 +26,8 @@ class PipelinedQueryExecutionContext {
|
|
|
22
26
|
partitionedQueryExecutionInfo;
|
|
23
27
|
emitRawOrderByPayload;
|
|
24
28
|
fetchBuffer;
|
|
25
|
-
fetchMoreRespHeaders;
|
|
26
29
|
endpoint;
|
|
27
|
-
|
|
28
|
-
vectorSearchBufferSize = 0;
|
|
29
|
-
static DEFAULT_PAGE_SIZE = 10;
|
|
30
|
-
static DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE = 50000;
|
|
31
|
-
nonStreamingOrderBy = false;
|
|
30
|
+
fetchImplementation;
|
|
32
31
|
constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo, correlatedActivityId, emitRawOrderByPayload = false) {
|
|
33
32
|
this.clientContext = clientContext;
|
|
34
33
|
this.collectionLink = collectionLink;
|
|
@@ -36,131 +35,161 @@ class PipelinedQueryExecutionContext {
|
|
|
36
35
|
this.options = options;
|
|
37
36
|
this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;
|
|
38
37
|
this.emitRawOrderByPayload = emitRawOrderByPayload;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// Pick between Nonstreaming and streaming endpoints
|
|
45
|
-
this.nonStreamingOrderBy = partitionedQueryExecutionInfo.queryInfo.hasNonStreamingOrderBy;
|
|
46
|
-
// Pick between parallel vs order by execution context
|
|
47
|
-
const sortOrders = partitionedQueryExecutionInfo.queryInfo.orderBy;
|
|
48
|
-
// TODO: Currently we don't get any field from backend to determine streaming queries
|
|
49
|
-
if (this.nonStreamingOrderBy) {
|
|
50
|
-
if (!options.allowUnboundedNonStreamingQueries) {
|
|
51
|
-
this.checkQueryConstraints(partitionedQueryExecutionInfo.queryInfo);
|
|
52
|
-
}
|
|
53
|
-
this.vectorSearchBufferSize = this.calculateVectorSearchBufferSize(partitionedQueryExecutionInfo.queryInfo, options);
|
|
54
|
-
const maxBufferSize = options["vectorSearchBufferSize"]
|
|
55
|
-
? options["vectorSearchBufferSize"]
|
|
56
|
-
: PipelinedQueryExecutionContext.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;
|
|
57
|
-
if (this.vectorSearchBufferSize > maxBufferSize) {
|
|
58
|
-
throw new ErrorResponse_js_1.ErrorResponse(`Executing a vector search query with TOP or OFFSET + LIMIT value ${this.vectorSearchBufferSize} larger than the vectorSearchBufferSize ${maxBufferSize} ` +
|
|
59
|
-
`is not allowed`);
|
|
60
|
-
}
|
|
61
|
-
const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
|
62
|
-
const context = new parallelQueryExecutionContext_js_1.ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo, correlatedActivityId);
|
|
63
|
-
if (distinctType === "None") {
|
|
64
|
-
this.endpoint = new NonStreamingOrderByEndpointComponent_js_1.NonStreamingOrderByEndpointComponent(context, sortOrders, this.vectorSearchBufferSize, partitionedQueryExecutionInfo.queryInfo.offset, this.emitRawOrderByPayload);
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
this.endpoint = new NonStreamingOrderByDistinctEndpointComponent_js_1.NonStreamingOrderByDistinctEndpointComponent(context, partitionedQueryExecutionInfo.queryInfo, this.vectorSearchBufferSize, this.emitRawOrderByPayload);
|
|
68
|
-
}
|
|
38
|
+
// Validate that queryInfo is present in partitioned query execution info
|
|
39
|
+
if (!partitionedQueryExecutionInfo.queryInfo) {
|
|
40
|
+
throw new ErrorResponse_js_1.ErrorResponse("Query execution requires valid query plan information. " +
|
|
41
|
+
"The partitioned query execution info is missing queryInfo. " +
|
|
42
|
+
"This may indicate an invalid query or a problem with query planning.");
|
|
69
43
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.endpoint = new GroupByValueEndpointComponent_js_1.GroupByValueEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
this.endpoint = new GroupByEndpointComponent_js_1.GroupByEndpointComponent(this.endpoint, partitionedQueryExecutionInfo.queryInfo);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// If distinct then add that to the pipeline
|
|
91
|
-
const distinctType = partitionedQueryExecutionInfo.queryInfo.distinctType;
|
|
92
|
-
if (distinctType === "Ordered") {
|
|
93
|
-
this.endpoint = new OrderedDistinctEndpointComponent_js_1.OrderedDistinctEndpointComponent(this.endpoint);
|
|
94
|
-
}
|
|
95
|
-
if (distinctType === "Unordered") {
|
|
96
|
-
this.endpoint = new UnorderedDistinctEndpointComponent_js_1.UnorderedDistinctEndpointComponent(this.endpoint);
|
|
97
|
-
}
|
|
98
|
-
// If top then add that to the pipeline. TOP N is effectively OFFSET 0 LIMIT N
|
|
99
|
-
const top = partitionedQueryExecutionInfo.queryInfo.top;
|
|
100
|
-
if (typeof top === "number") {
|
|
101
|
-
this.endpoint = new OffsetLimitEndpointComponent_js_1.OffsetLimitEndpointComponent(this.endpoint, 0, top);
|
|
102
|
-
}
|
|
103
|
-
// If offset+limit then add that to the pipeline
|
|
104
|
-
const limit = partitionedQueryExecutionInfo.queryInfo.limit;
|
|
105
|
-
const offset = partitionedQueryExecutionInfo.queryInfo.offset;
|
|
106
|
-
if (typeof limit === "number" && typeof offset === "number") {
|
|
107
|
-
this.endpoint = new OffsetLimitEndpointComponent_js_1.OffsetLimitEndpointComponent(this.endpoint, offset, limit);
|
|
108
|
-
}
|
|
44
|
+
if (!this.options.maxItemCount) {
|
|
45
|
+
this.options.maxItemCount = constants_js_1.QueryExecution.DEFAULT_PAGE_SIZE;
|
|
46
|
+
}
|
|
47
|
+
const pageSize = this.options.maxItemCount;
|
|
48
|
+
// Extract query information and characteristics
|
|
49
|
+
const analyzedQueryInfo = this.analyzeQueryInfo(partitionedQueryExecutionInfo.queryInfo);
|
|
50
|
+
const { sortOrders, nonStreamingOrderBy, isOrderByQuery, isGroupByQuery, isUnorderedDistinctQuery, querySupportsTokens, } = analyzedQueryInfo;
|
|
51
|
+
// Reject continuation token usage for unsupported query types
|
|
52
|
+
if (!querySupportsTokens) {
|
|
53
|
+
(0, QueryValidationHelper_js_1.rejectContinuationTokenForUnsupportedQueries)(this.options.continuationToken, [
|
|
54
|
+
QueryValidationHelper_js_1.QueryTypes.nonStreamingOrderBy(nonStreamingOrderBy),
|
|
55
|
+
QueryValidationHelper_js_1.QueryTypes.groupBy(isGroupByQuery),
|
|
56
|
+
QueryValidationHelper_js_1.QueryTypes.unorderedDistinct(isUnorderedDistinctQuery),
|
|
57
|
+
]);
|
|
109
58
|
}
|
|
59
|
+
// Parse continuation token fields once for reuse in pipeline construction
|
|
60
|
+
const queryContinuationFields = this.options.continuationToken
|
|
61
|
+
? (0, ContinuationTokenParser_js_1.parseContinuationTokenFields)(this.options.continuationToken)
|
|
62
|
+
: undefined;
|
|
63
|
+
// Pick between non-streaming vs streaming execution context
|
|
64
|
+
this.endpoint = nonStreamingOrderBy
|
|
65
|
+
? this.createNonStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, options)
|
|
66
|
+
: this.createStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, isGroupByQuery, queryContinuationFields);
|
|
110
67
|
this.fetchBuffer = [];
|
|
68
|
+
// Initialize the appropriate fetch implementation based on enableQueryControl
|
|
69
|
+
if (this.options.enableQueryControl) {
|
|
70
|
+
this.fetchImplementation = new QueryControlFetchImplementation_js_1.QueryControlFetchImplementation(this.endpoint, pageSize, this.collectionLink, this.options.continuationToken, isOrderByQuery, querySupportsTokens);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.fetchImplementation = new LegacyFetchImplementation_js_1.LegacyFetchImplementation(this.endpoint, pageSize);
|
|
74
|
+
}
|
|
111
75
|
}
|
|
112
76
|
hasMoreResults() {
|
|
113
77
|
return this.fetchBuffer.length !== 0 || this.endpoint.hasMoreResults();
|
|
114
78
|
}
|
|
115
79
|
async fetchMore(diagnosticNode) {
|
|
116
|
-
this.
|
|
117
|
-
return this._fetchMoreImplementation(diagnosticNode);
|
|
80
|
+
return this.fetchImplementation.fetchMore(diagnosticNode, this.fetchBuffer);
|
|
118
81
|
}
|
|
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
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Creates a non-streaming endpoint for vector search and similar queries that require buffering
|
|
84
|
+
*/
|
|
85
|
+
createNonStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, options) {
|
|
86
|
+
const queryInfo = partitionedQueryExecutionInfo.queryInfo; // Safe to use ! after validation in constructor
|
|
87
|
+
if (!options.allowUnboundedNonStreamingQueries) {
|
|
88
|
+
this.checkQueryConstraints(queryInfo);
|
|
89
|
+
}
|
|
90
|
+
const vectorSearchBufferSize = this.calculateVectorSearchBufferSize(queryInfo, options);
|
|
91
|
+
this.validateVectorSearchBufferSize(vectorSearchBufferSize, options);
|
|
92
|
+
const baseContext = new parallelQueryExecutionContext_js_1.ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, this.partitionedQueryExecutionInfo, correlatedActivityId);
|
|
93
|
+
return this.wrapWithNonStreamingComponent(baseContext, queryInfo, sortOrders, vectorSearchBufferSize);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Creates a streaming endpoint with proper pipeline components
|
|
97
|
+
*/
|
|
98
|
+
createStreamingEndpoint(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId, isGroupByQuery, queryContinuationFields) {
|
|
99
|
+
const queryInfo = partitionedQueryExecutionInfo.queryInfo; // Safe to use ! after validation in constructor
|
|
100
|
+
// Create base execution context
|
|
101
|
+
let endpoint = this.createBaseExecutionContext(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId);
|
|
102
|
+
// Apply pipeline transformations
|
|
103
|
+
endpoint = this.applyGroupByComponents(endpoint, queryInfo, isGroupByQuery);
|
|
104
|
+
endpoint = this.applyDistinctComponents(endpoint, queryInfo, queryContinuationFields);
|
|
105
|
+
endpoint = this.applyLimitComponents(endpoint, queryInfo, queryContinuationFields);
|
|
106
|
+
return endpoint;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Creates the base execution context (OrderBy or Parallel)
|
|
110
|
+
*/
|
|
111
|
+
createBaseExecutionContext(partitionedQueryExecutionInfo, sortOrders, correlatedActivityId) {
|
|
112
|
+
if (Array.isArray(sortOrders) && sortOrders.length > 0) {
|
|
113
|
+
// OrderBy queries need special wrapping for payload structure
|
|
114
|
+
return new OrderByEndpointComponent_js_1.OrderByEndpointComponent(new orderByQueryExecutionContext_js_1.OrderByQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, partitionedQueryExecutionInfo, correlatedActivityId), this.emitRawOrderByPayload);
|
|
115
|
+
}
|
|
116
|
+
// Parallel queries
|
|
117
|
+
return new parallelQueryExecutionContext_js_1.ParallelQueryExecutionContext(this.clientContext, this.collectionLink, this.query, this.options, partitionedQueryExecutionInfo, correlatedActivityId);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Wraps base context with appropriate non-streaming component
|
|
121
|
+
*/
|
|
122
|
+
wrapWithNonStreamingComponent(baseContext, queryInfo, sortOrders, vectorSearchBufferSize) {
|
|
123
|
+
const distinctType = queryInfo.distinctType;
|
|
124
|
+
if (distinctType === "None") {
|
|
125
|
+
return new NonStreamingOrderByEndpointComponent_js_1.NonStreamingOrderByEndpointComponent(baseContext, sortOrders, vectorSearchBufferSize, queryInfo.offset, this.emitRawOrderByPayload);
|
|
126
|
+
}
|
|
127
|
+
return new NonStreamingOrderByDistinctEndpointComponent_js_1.NonStreamingOrderByDistinctEndpointComponent(baseContext, queryInfo, vectorSearchBufferSize, this.emitRawOrderByPayload);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Applies GROUP BY components to the pipeline if needed
|
|
131
|
+
*/
|
|
132
|
+
applyGroupByComponents(endpoint, queryInfo, isGroupByQuery) {
|
|
133
|
+
if (!isGroupByQuery) {
|
|
134
|
+
return endpoint;
|
|
135
|
+
}
|
|
136
|
+
return queryInfo.hasSelectValue
|
|
137
|
+
? new GroupByValueEndpointComponent_js_1.GroupByValueEndpointComponent(endpoint, queryInfo)
|
|
138
|
+
: new GroupByEndpointComponent_js_1.GroupByEndpointComponent(endpoint, queryInfo);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Applies DISTINCT components to the pipeline if needed
|
|
142
|
+
*/
|
|
143
|
+
applyDistinctComponents(endpoint, queryInfo, queryContinuationFields) {
|
|
144
|
+
const distinctType = queryInfo.distinctType;
|
|
145
|
+
if (distinctType === "Ordered") {
|
|
146
|
+
const lastHash = queryContinuationFields?.hashedLastResult;
|
|
147
|
+
return new OrderedDistinctEndpointComponent_js_1.OrderedDistinctEndpointComponent(endpoint, lastHash);
|
|
148
|
+
}
|
|
149
|
+
if (distinctType === "Unordered") {
|
|
150
|
+
return new UnorderedDistinctEndpointComponent_js_1.UnorderedDistinctEndpointComponent(endpoint);
|
|
151
|
+
}
|
|
152
|
+
return endpoint;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Applies TOP and OFFSET+LIMIT components to the pipeline if needed
|
|
156
|
+
*/
|
|
157
|
+
applyLimitComponents(endpoint, queryInfo, queryContinuationFields) {
|
|
158
|
+
// Apply TOP component (TOP N is effectively OFFSET 0 LIMIT N)
|
|
159
|
+
let top = queryInfo.top;
|
|
160
|
+
if (typeof top === "number") {
|
|
161
|
+
if (queryContinuationFields?.limit !== undefined) {
|
|
162
|
+
top = queryContinuationFields.limit;
|
|
155
163
|
}
|
|
164
|
+
endpoint = new OffsetLimitEndpointComponent_js_1.OffsetLimitEndpointComponent(endpoint, 0, top);
|
|
156
165
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
166
|
+
// Apply OFFSET+LIMIT component
|
|
167
|
+
let limit = queryInfo.limit;
|
|
168
|
+
let offset = queryInfo.offset;
|
|
169
|
+
if (queryContinuationFields) {
|
|
170
|
+
if (queryContinuationFields.limit !== undefined) {
|
|
171
|
+
limit = queryContinuationFields.limit;
|
|
172
|
+
}
|
|
173
|
+
if (queryContinuationFields.offset !== undefined) {
|
|
174
|
+
offset = queryContinuationFields.offset;
|
|
162
175
|
}
|
|
163
176
|
}
|
|
177
|
+
if (typeof limit === "number" && typeof offset === "number") {
|
|
178
|
+
endpoint = new OffsetLimitEndpointComponent_js_1.OffsetLimitEndpointComponent(endpoint, offset, limit);
|
|
179
|
+
}
|
|
180
|
+
return endpoint;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Validates vector search buffer size constraints
|
|
184
|
+
*/
|
|
185
|
+
validateVectorSearchBufferSize(vectorSearchBufferSize, options) {
|
|
186
|
+
const maxBufferSize = options["vectorSearchBufferSize"]
|
|
187
|
+
? options["vectorSearchBufferSize"]
|
|
188
|
+
: constants_js_1.QueryExecution.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;
|
|
189
|
+
if (vectorSearchBufferSize > maxBufferSize) {
|
|
190
|
+
throw new ErrorResponse_js_1.ErrorResponse(`Executing a vector search query with TOP or OFFSET + LIMIT value ${vectorSearchBufferSize} larger than the vectorSearchBufferSize ${maxBufferSize} ` +
|
|
191
|
+
`is not allowed`);
|
|
192
|
+
}
|
|
164
193
|
}
|
|
165
194
|
calculateVectorSearchBufferSize(queryInfo, options) {
|
|
166
195
|
if (queryInfo.top === 0 || queryInfo.limit === 0)
|
|
@@ -171,7 +200,7 @@ class PipelinedQueryExecutionContext {
|
|
|
171
200
|
? queryInfo.offset + queryInfo.limit
|
|
172
201
|
: options["vectorSearchBufferSize"] && options["vectorSearchBufferSize"] > 0
|
|
173
202
|
? options["vectorSearchBufferSize"]
|
|
174
|
-
:
|
|
203
|
+
: constants_js_1.QueryExecution.DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE;
|
|
175
204
|
}
|
|
176
205
|
checkQueryConstraints(queryInfo) {
|
|
177
206
|
const hasTop = queryInfo.top || queryInfo.top === 0;
|
|
@@ -183,6 +212,30 @@ class PipelinedQueryExecutionContext {
|
|
|
183
212
|
}
|
|
184
213
|
return;
|
|
185
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Analyzes query information and extracts key characteristics for query execution planning
|
|
217
|
+
*/
|
|
218
|
+
analyzeQueryInfo(queryInfo) {
|
|
219
|
+
const sortOrders = queryInfo.orderBy;
|
|
220
|
+
const nonStreamingOrderBy = queryInfo.hasNonStreamingOrderBy;
|
|
221
|
+
const isOrderByQuery = Array.isArray(sortOrders) && sortOrders.length > 0;
|
|
222
|
+
// Check if this is a GROUP BY query
|
|
223
|
+
const isGroupByQuery = Object.keys(queryInfo.groupByAliasToAggregateType || {}).length > 0 ||
|
|
224
|
+
(queryInfo.aggregates?.length || 0) > 0 ||
|
|
225
|
+
(queryInfo.groupByExpressions?.length || 0) > 0;
|
|
226
|
+
// Check if this is an unordered DISTINCT query
|
|
227
|
+
const isUnorderedDistinctQuery = queryInfo.distinctType === "Unordered";
|
|
228
|
+
// Determine if this query type supports continuation tokens
|
|
229
|
+
const querySupportsTokens = !isUnorderedDistinctQuery && !isGroupByQuery && !nonStreamingOrderBy;
|
|
230
|
+
return {
|
|
231
|
+
sortOrders,
|
|
232
|
+
nonStreamingOrderBy,
|
|
233
|
+
isOrderByQuery,
|
|
234
|
+
isGroupByQuery,
|
|
235
|
+
isUnorderedDistinctQuery,
|
|
236
|
+
querySupportsTokens,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
186
239
|
}
|
|
187
240
|
exports.PipelinedQueryExecutionContext = PipelinedQueryExecutionContext;
|
|
188
241
|
//# sourceMappingURL=pipelinedQueryExecutionContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelinedQueryExecutionContext.js","sourceRoot":"","sources":["../../../src/queryExecutionContext/pipelinedQueryExecutionContext.ts"],"names":[],"mappings":";;;AAKA,kEAA4D;AAE5D,yGAAmG;AACnG,iGAA2F;AAC3F,iHAA2G;AAC3G,qHAA+G;AAC/G,iGAA2F;AAE3F,qDAAkE;AAClE,uFAAiF;AACjF,yFAAmF;AACnF,2GAAqG;AAGrG,yIAAmI;AACnI,yHAAmH;AAEnH,cAAc;AACd,MAAa,8BAA8B;IAW/B;IACA;IACA;IACA;IACA;IAEA;IAhBF,WAAW,CAAQ;IACnB,oBAAoB,CAAgB;IACpC,QAAQ,CAAmB;IAC3B,QAAQ,CAAS;IACjB,sBAAsB,GAAW,CAAC,CAAC;IACnC,MAAM,CAAC,iBAAiB,GAAG,EAAE,CAAC;IAC9B,MAAM,CAAC,qCAAqC,GAAG,KAA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AAS,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;YACzB,MAAM,IAAI,gCAAa,CACrB,gGAAgG;gBAC9F,6FAA6F;gBAC7F,gCAAgC,CACnC,CAAC;QACJ,CAAC;QACD,OAAO;IACT,CAAC;;AA9NH,wEA+NC","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,kEAA4D;AAC5D,yGAAmG;AACnG,iGAA2F;AAC3F,iHAA2G;AAC3G,qHAA+G;AAC/G,iGAA2F;AAE3F,uFAAiF;AACjF,yFAAmF;AACnF,2GAAqG;AAGrG,yIAAmI;AACnI,yHAAmH;AACnH,yEAGoC;AACpC,6EAA4E;AAC5E,iFAA2E;AAC3E,6FAAuF;AACvF,yDAAwD;AAExD,cAAc;AACd,MAAa,8BAA8B;IAM/B;IACA;IACA;IACA;IACA;IAEA;IAXF,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} 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 { 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"]}
|
package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts
ADDED
|
@@ -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
|
|
@@ -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"}
|