@azure/cosmos 4.9.1 → 4.9.3
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/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/browser/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/browser/PartitionKeyRangeFailoverInfo.js +0 -2
- package/dist/browser/PartitionKeyRangeFailoverInfo.js.map +1 -1
- package/dist/browser/bulk/index.d.ts +1 -1
- package/dist/browser/bulk/index.d.ts.map +1 -1
- package/dist/browser/bulk/index.js.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/browser/client/ChangeFeed/buildChangeFeedIterator.js.map +1 -1
- package/dist/browser/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/browser/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/changeFeedUtils.js.map +1 -1
- package/dist/browser/client/ChangeFeed/index.d.ts +2 -2
- package/dist/browser/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/index.js.map +1 -1
- package/dist/browser/client/ClientUtils.d.ts +1 -1
- package/dist/browser/client/ClientUtils.d.ts.map +1 -1
- package/dist/browser/client/ClientUtils.js.map +1 -1
- package/dist/browser/client/Conflict/index.d.ts +2 -2
- package/dist/browser/client/Conflict/index.d.ts.map +1 -1
- package/dist/browser/client/Conflict/index.js.map +1 -1
- package/dist/browser/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/browser/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/browser/client/Container/ContainerDefinition.js.map +1 -1
- package/dist/browser/client/Container/index.d.ts +4 -4
- package/dist/browser/client/Container/index.d.ts.map +1 -1
- package/dist/browser/client/Container/index.js.map +1 -1
- package/dist/browser/client/Database/index.d.ts +2 -2
- package/dist/browser/client/Database/index.d.ts.map +1 -1
- package/dist/browser/client/Database/index.js.map +1 -1
- package/dist/browser/client/Item/Items.d.ts.map +1 -1
- package/dist/browser/client/Item/Items.js.map +1 -1
- package/dist/browser/client/Item/index.d.ts +1 -1
- package/dist/browser/client/Item/index.d.ts.map +1 -1
- package/dist/browser/client/Item/index.js.map +1 -1
- package/dist/browser/client/Offer/index.d.ts +1 -1
- package/dist/browser/client/Offer/index.d.ts.map +1 -1
- package/dist/browser/client/Offer/index.js.map +1 -1
- package/dist/browser/client/Permission/index.d.ts +2 -2
- package/dist/browser/client/Permission/index.d.ts.map +1 -1
- package/dist/browser/client/Permission/index.js.map +1 -1
- package/dist/browser/client/StoredProcedure/index.d.ts +1 -1
- package/dist/browser/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/browser/client/StoredProcedure/index.js.map +1 -1
- package/dist/browser/client/Trigger/index.d.ts +1 -1
- package/dist/browser/client/Trigger/index.d.ts.map +1 -1
- package/dist/browser/client/Trigger/index.js.map +1 -1
- package/dist/browser/client/User/index.d.ts +1 -1
- package/dist/browser/client/User/index.d.ts.map +1 -1
- package/dist/browser/client/User/index.js.map +1 -1
- package/dist/browser/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/browser/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/browser/client/UserDefinedFunction/index.js.map +1 -1
- package/dist/browser/client/index.d.ts +1 -1
- package/dist/browser/client/index.d.ts.map +1 -1
- package/dist/browser/client/index.js +0 -1
- package/dist/browser/client/index.js.map +1 -1
- package/dist/browser/common/constants.js +1 -1
- package/dist/browser/common/constants.js.map +1 -1
- package/dist/browser/common/helper.d.ts +4 -4
- package/dist/browser/common/helper.d.ts.map +1 -1
- package/dist/browser/common/helper.js.map +1 -1
- package/dist/browser/common/platform.d.ts +1 -1
- package/dist/browser/common/platform.d.ts.map +1 -1
- package/dist/browser/common/platform.js.map +1 -1
- package/dist/browser/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/browser/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/browser/diagnostics/DiagnosticNodeInternal.js.map +1 -1
- package/dist/browser/documents/index.d.ts +4 -4
- package/dist/browser/documents/index.d.ts.map +1 -1
- package/dist/browser/documents/index.js +0 -4
- package/dist/browser/documents/index.js.map +1 -1
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +6 -2
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -0
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js +8 -3
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +1 -0
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.d.ts +5 -1
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.d.ts.map +1 -0
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.js +5 -2
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.js.map +1 -0
- package/dist/browser/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/browser/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/browser/encryption/ClientEncryptionIncludedPath.js.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/browser/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/browser/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/index.js.map +1 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.d.ts +6 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.d.ts.map +1 -0
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.js +8 -2
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.js.map +1 -0
- package/dist/browser/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/browser/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/browser/encryption/EncryptionKeyResolver/index.js.map +1 -1
- package/dist/browser/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/browser/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/browser/encryption/EncryptionQueryBuilder.js.map +1 -1
- package/dist/browser/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/browser/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/BooleanSerializer.js.map +1 -1
- package/dist/browser/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/browser/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/FloatSerializer.js.map +1 -1
- package/dist/browser/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/browser/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/StringSerializer.js.map +1 -1
- package/dist/browser/encryption/Serializers/index.d.ts +1 -1
- package/dist/browser/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/index.js.map +1 -1
- package/dist/browser/encryption/index.d.ts +5 -5
- package/dist/browser/encryption/index.d.ts.map +1 -1
- package/dist/browser/encryption/index.js.map +1 -1
- package/dist/browser/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/browser/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/browser/globalPartitionEndpointManager.js.map +1 -1
- package/dist/browser/index.d.ts +16 -16
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +26 -18
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +48 -25
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +17 -26
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js +13 -12
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/index.d.ts +2 -2
- package/dist/browser/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/index.js +0 -2
- package/dist/browser/queryExecutionContext/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +6 -5
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +2 -10
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -1
- package/dist/browser/request/defaultAgent.d.ts +1 -1
- package/dist/browser/request/defaultAgent.d.ts.map +1 -0
- package/dist/browser/request/defaultAgent.js +1 -1
- package/dist/browser/request/defaultAgent.js.map +1 -0
- package/dist/browser/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/browser/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/browser/request/hybridSearchQueryResult.js.map +1 -1
- package/dist/browser/request/index.d.ts +8 -8
- package/dist/browser/request/index.d.ts.map +1 -1
- package/dist/browser/request/index.js +0 -1
- package/dist/browser/request/index.js.map +1 -1
- package/dist/browser/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/browser/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/browser/retry/endpointDiscoveryRetryPolicy.js.map +1 -1
- package/dist/browser/retry/index.d.ts +1 -1
- package/dist/browser/retry/index.d.ts.map +1 -1
- package/dist/browser/retry/index.js +0 -3
- package/dist/browser/retry/index.js.map +1 -1
- package/dist/browser/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/browser/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/browser/retry/timeoutFailoverRetryPolicy.js.map +1 -1
- package/dist/browser/utils/atob.d.ts +1 -1
- package/dist/browser/utils/atob.d.ts.map +1 -0
- package/dist/browser/utils/atob.js +1 -1
- package/dist/browser/utils/atob.js.map +1 -0
- package/dist/browser/utils/digest.d.ts +1 -1
- package/dist/browser/utils/digest.d.ts.map +1 -0
- package/dist/browser/utils/digest.js +1 -1
- package/dist/browser/utils/digest.js.map +1 -0
- package/dist/browser/utils/envUtils.d.ts +1 -1
- package/dist/browser/utils/envUtils.d.ts.map +1 -0
- package/dist/browser/utils/envUtils.js +1 -1
- package/dist/browser/utils/envUtils.js.map +1 -0
- package/dist/browser/utils/hashing/hash.d.ts +1 -1
- package/dist/browser/utils/hashing/hash.d.ts.map +1 -1
- package/dist/browser/utils/hashing/hash.js.map +1 -1
- package/dist/browser/utils/hmac.d.ts +1 -1
- package/dist/browser/utils/hmac.d.ts.map +1 -0
- package/dist/browser/utils/hmac.js +1 -1
- package/dist/browser/utils/hmac.js.map +1 -0
- package/dist/commonjs/ChangeFeedIterator.js +131 -110
- package/dist/commonjs/ChangeFeedIterator.js.map +7 -1
- package/dist/commonjs/ChangeFeedOptions.js +16 -3
- package/dist/commonjs/ChangeFeedOptions.js.map +7 -1
- package/dist/commonjs/ChangeFeedResponse.js +85 -78
- package/dist/commonjs/ChangeFeedResponse.js.map +7 -1
- package/dist/commonjs/ClientContext.js +873 -761
- package/dist/commonjs/ClientContext.js.map +7 -1
- package/dist/commonjs/CosmosClient.js +294 -286
- package/dist/commonjs/CosmosClient.js.map +7 -1
- package/dist/commonjs/CosmosClientOptions.js +16 -3
- package/dist/commonjs/CosmosClientOptions.js.map +7 -1
- package/dist/commonjs/CosmosDiagnostics.js +52 -55
- package/dist/commonjs/CosmosDiagnostics.js.map +7 -1
- package/dist/commonjs/GlobalEndpointManagerOptions.js +16 -3
- package/dist/commonjs/GlobalEndpointManagerOptions.js.map +7 -1
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.js +149 -134
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.js.map +7 -1
- package/dist/commonjs/auth.js +92 -84
- package/dist/commonjs/auth.js.map +7 -1
- package/dist/commonjs/bulk/Batcher.js +178 -149
- package/dist/commonjs/bulk/Batcher.js.map +7 -1
- package/dist/commonjs/bulk/BulkHelper.js +321 -289
- package/dist/commonjs/bulk/BulkHelper.js.map +7 -1
- package/dist/commonjs/bulk/BulkResponse.js +141 -118
- package/dist/commonjs/bulk/BulkResponse.js.map +7 -1
- package/dist/commonjs/bulk/CongestionAlgorithm.js +72 -66
- package/dist/commonjs/bulk/CongestionAlgorithm.js.map +7 -1
- package/dist/commonjs/bulk/HelperPerPartition.js +168 -130
- package/dist/commonjs/bulk/HelperPerPartition.js.map +7 -1
- package/dist/commonjs/bulk/ItemOperation.js +16 -5
- package/dist/commonjs/bulk/ItemOperation.js.map +7 -1
- package/dist/commonjs/bulk/ItemOperationContext.js +54 -38
- package/dist/commonjs/bulk/ItemOperationContext.js.map +7 -1
- package/dist/commonjs/bulk/Limiter.js +199 -212
- package/dist/commonjs/bulk/Limiter.js.map +7 -1
- package/dist/commonjs/bulk/PartitionMetric.js +59 -35
- package/dist/commonjs/bulk/PartitionMetric.js.map +7 -1
- package/dist/commonjs/bulk/index.d.ts +1 -1
- package/dist/commonjs/bulk/index.d.ts.map +1 -1
- package/dist/commonjs/bulk/index.js +31 -10
- package/dist/commonjs/bulk/index.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedEnums.js +32 -14
- package/dist/commonjs/client/ChangeFeed/ChangeFeedEnums.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.js +383 -327
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.js +187 -146
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorBuilder.js +83 -63
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorBuilder.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.js +16 -5
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorResponse.js +73 -78
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorResponse.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedMode.js +32 -11
- package/dist/commonjs/client/ChangeFeed/ChangeFeedMode.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPolicy.js +31 -12
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPolicy.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPullModelIterator.js +16 -3
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPullModelIterator.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRange.js +54 -38
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRetentionTimeSpan.js +53 -36
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRetentionTimeSpan.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFrom.js +71 -54
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFrom.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromBeginning.js +34 -16
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromBeginning.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromContinuation.js +48 -38
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromContinuation.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromNow.js +34 -18
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromNow.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromTime.js +39 -21
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromTime.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/CompositeContinuationToken.js +39 -21
- package/dist/commonjs/client/ChangeFeed/CompositeContinuationToken.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ContinuationTokenForPartitionKey.js +44 -26
- package/dist/commonjs/client/ChangeFeed/ContinuationTokenForPartitionKey.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/FeedRange.js +51 -38
- package/dist/commonjs/client/ChangeFeed/FeedRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/FeedRangeQueue.js +69 -49
- package/dist/commonjs/client/ChangeFeed/FeedRangeQueue.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.js +16 -5
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/buildChangeFeedIterator.js +144 -71
- package/dist/commonjs/client/ChangeFeed/buildChangeFeedIterator.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.js +161 -188
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/index.d.ts +2 -2
- package/dist/commonjs/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/index.js +60 -29
- package/dist/commonjs/client/ChangeFeed/index.js.map +7 -1
- package/dist/commonjs/client/ClientUtils.d.ts +1 -1
- package/dist/commonjs/client/ClientUtils.d.ts.map +1 -1
- package/dist/commonjs/client/ClientUtils.js +43 -16
- package/dist/commonjs/client/ClientUtils.js.map +7 -1
- package/dist/commonjs/client/Conflict/Conflict.js +132 -100
- package/dist/commonjs/client/Conflict/Conflict.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictDefinition.js +16 -3
- package/dist/commonjs/client/Conflict/ConflictDefinition.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResolutionMode.js +32 -11
- package/dist/commonjs/client/Conflict/ConflictResolutionMode.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResolutionPolicy.js +16 -3
- package/dist/commonjs/client/Conflict/ConflictResolutionPolicy.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResponse.js +35 -13
- package/dist/commonjs/client/Conflict/ConflictResponse.js.map +7 -1
- package/dist/commonjs/client/Conflict/Conflicts.js +73 -51
- package/dist/commonjs/client/Conflict/Conflicts.js.map +7 -1
- package/dist/commonjs/client/Conflict/index.d.ts +2 -2
- package/dist/commonjs/client/Conflict/index.d.ts.map +1 -1
- package/dist/commonjs/client/Conflict/index.js +37 -14
- package/dist/commonjs/client/Conflict/index.js.map +7 -1
- package/dist/commonjs/client/Container/Container.js +669 -599
- package/dist/commonjs/client/Container/Container.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/commonjs/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/commonjs/client/Container/ContainerDefinition.js +16 -3
- package/dist/commonjs/client/Container/ContainerDefinition.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerRequest.js +16 -3
- package/dist/commonjs/client/Container/ContainerRequest.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerResponse.js +35 -14
- package/dist/commonjs/client/Container/ContainerResponse.js.map +7 -1
- package/dist/commonjs/client/Container/Containers.js +236 -218
- package/dist/commonjs/client/Container/Containers.js.map +7 -1
- package/dist/commonjs/client/Container/PartitionKeyRange.js +16 -3
- package/dist/commonjs/client/Container/PartitionKeyRange.js.map +7 -1
- package/dist/commonjs/client/Container/UniqueKeyPolicy.js +16 -3
- package/dist/commonjs/client/Container/UniqueKeyPolicy.js.map +7 -1
- package/dist/commonjs/client/Container/index.d.ts +4 -4
- package/dist/commonjs/client/Container/index.d.ts.map +1 -1
- package/dist/commonjs/client/Container/index.js +34 -12
- package/dist/commonjs/client/Container/index.js.map +7 -1
- package/dist/commonjs/client/Database/Database.js +533 -448
- package/dist/commonjs/client/Database/Database.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseDefinition.js +16 -3
- package/dist/commonjs/client/Database/DatabaseDefinition.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseRequest.js +16 -3
- package/dist/commonjs/client/Database/DatabaseRequest.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseResponse.js +35 -14
- package/dist/commonjs/client/Database/DatabaseResponse.js.map +7 -1
- package/dist/commonjs/client/Database/Databases.js +201 -188
- package/dist/commonjs/client/Database/Databases.js.map +7 -1
- package/dist/commonjs/client/Database/index.d.ts +2 -2
- package/dist/commonjs/client/Database/index.d.ts.map +1 -1
- package/dist/commonjs/client/Database/index.js +34 -12
- package/dist/commonjs/client/Database/index.js.map +7 -1
- package/dist/commonjs/client/Item/Item.js +510 -383
- package/dist/commonjs/client/Item/Item.js.map +7 -1
- package/dist/commonjs/client/Item/ItemDefinition.js +16 -5
- package/dist/commonjs/client/Item/ItemDefinition.js.map +7 -1
- package/dist/commonjs/client/Item/ItemResponse.js +35 -13
- package/dist/commonjs/client/Item/ItemResponse.js.map +7 -1
- package/dist/commonjs/client/Item/Items.d.ts.map +1 -1
- package/dist/commonjs/client/Item/Items.js +891 -717
- package/dist/commonjs/client/Item/Items.js.map +7 -1
- package/dist/commonjs/client/Item/index.d.ts +1 -1
- package/dist/commonjs/client/Item/index.d.ts.map +1 -1
- package/dist/commonjs/client/Item/index.js +34 -12
- package/dist/commonjs/client/Item/index.js.map +7 -1
- package/dist/commonjs/client/Offer/Offer.js +119 -90
- package/dist/commonjs/client/Offer/Offer.js.map +7 -1
- package/dist/commonjs/client/Offer/OfferDefinition.js +16 -3
- package/dist/commonjs/client/Offer/OfferDefinition.js.map +7 -1
- package/dist/commonjs/client/Offer/OfferResponse.js +35 -13
- package/dist/commonjs/client/Offer/OfferResponse.js.map +7 -1
- package/dist/commonjs/client/Offer/Offers.js +68 -51
- package/dist/commonjs/client/Offer/Offers.js.map +7 -1
- package/dist/commonjs/client/Offer/index.d.ts +1 -1
- package/dist/commonjs/client/Offer/index.d.ts.map +1 -1
- package/dist/commonjs/client/Offer/index.js +34 -12
- package/dist/commonjs/client/Offer/index.js.map +7 -1
- package/dist/commonjs/client/Permission/Permission.js +162 -127
- package/dist/commonjs/client/Permission/Permission.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionBody.js +16 -3
- package/dist/commonjs/client/Permission/PermissionBody.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionDefinition.js +16 -3
- package/dist/commonjs/client/Permission/PermissionDefinition.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionResponse.js +35 -13
- package/dist/commonjs/client/Permission/PermissionResponse.js.map +7 -1
- package/dist/commonjs/client/Permission/Permissions.js +173 -144
- package/dist/commonjs/client/Permission/Permissions.js.map +7 -1
- package/dist/commonjs/client/Permission/index.d.ts +2 -2
- package/dist/commonjs/client/Permission/index.d.ts.map +1 -1
- package/dist/commonjs/client/Permission/index.js +34 -12
- package/dist/commonjs/client/Permission/index.js.map +7 -1
- package/dist/commonjs/client/Resource.js +16 -3
- package/dist/commonjs/client/Resource.js.map +7 -1
- package/dist/commonjs/client/SasToken/PermissionScopeValues.js +92 -80
- package/dist/commonjs/client/SasToken/PermissionScopeValues.js.map +7 -1
- package/dist/commonjs/client/SasToken/SasTokenProperties.js +44 -24
- package/dist/commonjs/client/SasToken/SasTokenProperties.js.map +7 -1
- package/dist/commonjs/client/Script/Scripts.js +100 -80
- package/dist/commonjs/client/Script/Scripts.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedure.js +228 -185
- package/dist/commonjs/client/StoredProcedure/StoredProcedure.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedureDefinition.js +16 -3
- package/dist/commonjs/client/StoredProcedure/StoredProcedureDefinition.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedureResponse.js +45 -23
- package/dist/commonjs/client/StoredProcedure/StoredProcedureResponse.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedures.js +134 -111
- package/dist/commonjs/client/StoredProcedure/StoredProcedures.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/index.d.ts +1 -1
- package/dist/commonjs/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/commonjs/client/StoredProcedure/index.js +34 -12
- package/dist/commonjs/client/StoredProcedure/index.js.map +7 -1
- package/dist/commonjs/client/Trigger/Trigger.js +173 -138
- package/dist/commonjs/client/Trigger/Trigger.js.map +7 -1
- package/dist/commonjs/client/Trigger/TriggerDefinition.js +16 -3
- package/dist/commonjs/client/Trigger/TriggerDefinition.js.map +7 -1
- package/dist/commonjs/client/Trigger/TriggerResponse.js +35 -13
- package/dist/commonjs/client/Trigger/TriggerResponse.js.map +7 -1
- package/dist/commonjs/client/Trigger/Triggers.js +133 -110
- package/dist/commonjs/client/Trigger/Triggers.js.map +7 -1
- package/dist/commonjs/client/Trigger/index.d.ts +1 -1
- package/dist/commonjs/client/Trigger/index.d.ts.map +1 -1
- package/dist/commonjs/client/Trigger/index.js +34 -12
- package/dist/commonjs/client/Trigger/index.js.map +7 -1
- package/dist/commonjs/client/User/User.js +174 -141
- package/dist/commonjs/client/User/User.js.map +7 -1
- package/dist/commonjs/client/User/UserDefinition.js +16 -3
- package/dist/commonjs/client/User/UserDefinition.js.map +7 -1
- package/dist/commonjs/client/User/UserResponse.js +35 -13
- package/dist/commonjs/client/User/UserResponse.js.map +7 -1
- package/dist/commonjs/client/User/Users.js +157 -128
- package/dist/commonjs/client/User/Users.js.map +7 -1
- package/dist/commonjs/client/User/index.d.ts +1 -1
- package/dist/commonjs/client/User/index.d.ts.map +1 -1
- package/dist/commonjs/client/User/index.js +34 -12
- package/dist/commonjs/client/User/index.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunction.js +172 -137
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunction.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionDefinition.js +16 -3
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionDefinition.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionResponse.js +43 -21
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionResponse.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctions.js +130 -107
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctions.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/commonjs/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/commonjs/client/UserDefinedFunction/index.js +34 -12
- package/dist/commonjs/client/UserDefinedFunction/index.js.map +7 -1
- package/dist/commonjs/client/index.d.ts +1 -1
- package/dist/commonjs/client/index.d.ts.map +1 -1
- package/dist/commonjs/client/index.js +42 -18
- package/dist/commonjs/client/index.js.map +7 -1
- package/dist/commonjs/common/constants.js +515 -500
- package/dist/commonjs/common/constants.js.map +7 -1
- package/dist/commonjs/common/helper.d.ts +4 -4
- package/dist/commonjs/common/helper.d.ts.map +1 -1
- package/dist/commonjs/common/helper.js +350 -412
- package/dist/commonjs/common/helper.js.map +7 -1
- package/dist/commonjs/common/index.js +28 -10
- package/dist/commonjs/common/index.js.map +7 -1
- package/dist/commonjs/common/logger.js +29 -9
- package/dist/commonjs/common/logger.js.map +7 -1
- package/dist/commonjs/common/partitionKeys.js +28 -7
- package/dist/commonjs/common/partitionKeys.js.map +7 -1
- package/dist/commonjs/common/platform.d.ts +1 -1
- package/dist/commonjs/common/platform.d.ts.map +1 -1
- package/dist/commonjs/common/platform.js +55 -42
- package/dist/commonjs/common/platform.js.map +7 -1
- package/dist/commonjs/common/statusCodes.js +77 -60
- package/dist/commonjs/common/statusCodes.js.map +7 -1
- package/dist/commonjs/common/uriFactory.js +80 -195
- package/dist/commonjs/common/uriFactory.js.map +7 -1
- package/dist/commonjs/diagnostics/CosmosDbDiagnosticLevel.js +33 -15
- package/dist/commonjs/diagnostics/CosmosDbDiagnosticLevel.js.map +7 -1
- package/dist/commonjs/diagnostics/CosmosDiagnosticsContext.js +146 -126
- package/dist/commonjs/diagnostics/CosmosDiagnosticsContext.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticFormatter.js +30 -10
- package/dist/commonjs/diagnostics/DiagnosticFormatter.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.js +317 -305
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticWriter.js +36 -25
- package/dist/commonjs/diagnostics/DiagnosticWriter.js.map +7 -1
- package/dist/commonjs/diagnostics/diagnosticLevelComparator.js +40 -24
- package/dist/commonjs/diagnostics/diagnosticLevelComparator.js.map +7 -1
- package/dist/commonjs/diagnostics/index.js +68 -34
- package/dist/commonjs/diagnostics/index.js.map +7 -1
- package/dist/commonjs/documents/ComputedProperty.js +16 -3
- package/dist/commonjs/documents/ComputedProperty.js.map +7 -1
- package/dist/commonjs/documents/ConnectionMode.js +31 -12
- package/dist/commonjs/documents/ConnectionMode.js.map +7 -1
- package/dist/commonjs/documents/ConnectionPolicy.js +44 -26
- package/dist/commonjs/documents/ConnectionPolicy.js.map +7 -1
- package/dist/commonjs/documents/ConsistencyLevel.js +35 -43
- package/dist/commonjs/documents/ConsistencyLevel.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js +77 -79
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js +49 -38
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js +16 -5
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js.map +7 -1
- package/dist/commonjs/documents/DataType.js +36 -22
- package/dist/commonjs/documents/DataType.js.map +7 -1
- package/dist/commonjs/documents/DatabaseAccount.js +110 -100
- package/dist/commonjs/documents/DatabaseAccount.js.map +7 -1
- package/dist/commonjs/documents/Document.js +16 -3
- package/dist/commonjs/documents/Document.js.map +7 -1
- package/dist/commonjs/documents/FullTextPolicy.js +16 -5
- package/dist/commonjs/documents/FullTextPolicy.js.map +7 -1
- package/dist/commonjs/documents/GeospatialType.js +32 -13
- package/dist/commonjs/documents/GeospatialType.js.map +7 -1
- package/dist/commonjs/documents/IndexKind.js +32 -20
- package/dist/commonjs/documents/IndexKind.js.map +7 -1
- package/dist/commonjs/documents/IndexingMode.js +33 -27
- package/dist/commonjs/documents/IndexingMode.js.map +7 -1
- package/dist/commonjs/documents/IndexingPolicy.js +42 -30
- package/dist/commonjs/documents/IndexingPolicy.js.map +7 -1
- package/dist/commonjs/documents/PartitionKey.js +44 -27
- package/dist/commonjs/documents/PartitionKey.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyDefinition.js +16 -3
- package/dist/commonjs/documents/PartitionKeyDefinition.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyDefinitionVersion.js +32 -14
- package/dist/commonjs/documents/PartitionKeyDefinitionVersion.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyInternal.js +36 -28
- package/dist/commonjs/documents/PartitionKeyInternal.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyKind.js +32 -14
- package/dist/commonjs/documents/PartitionKeyKind.js.map +7 -1
- package/dist/commonjs/documents/PermissionMode.js +33 -18
- package/dist/commonjs/documents/PermissionMode.js.map +7 -1
- package/dist/commonjs/documents/PriorityLevel.js +32 -25
- package/dist/commonjs/documents/PriorityLevel.js.map +7 -1
- package/dist/commonjs/documents/TriggerOperation.js +35 -23
- package/dist/commonjs/documents/TriggerOperation.js.map +7 -1
- package/dist/commonjs/documents/TriggerType.js +32 -17
- package/dist/commonjs/documents/TriggerType.js.map +7 -1
- package/dist/commonjs/documents/UserDefinedFunctionType.js +31 -15
- package/dist/commonjs/documents/UserDefinedFunctionType.js.map +7 -1
- package/dist/commonjs/documents/VectorEmbeddingPolicy.js +42 -44
- package/dist/commonjs/documents/VectorEmbeddingPolicy.js.map +7 -1
- package/dist/commonjs/documents/index.d.ts +4 -4
- package/dist/commonjs/documents/index.d.ts.map +1 -1
- package/dist/commonjs/documents/index.js +58 -29
- package/dist/commonjs/documents/index.js.map +7 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +1 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js +98 -71
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +7 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/index.js +28 -8
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/index.js.map +7 -1
- package/dist/commonjs/encryption/Cache/ClientEncryptionKeyPropertiesCache.js +38 -23
- package/dist/commonjs/encryption/Cache/ClientEncryptionKeyPropertiesCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/EncryptionSettingsCache.js +53 -36
- package/dist/commonjs/encryption/Cache/EncryptionSettingsCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/KeyEncryptionKeyCache.js +47 -32
- package/dist/commonjs/encryption/Cache/KeyEncryptionKeyCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/ProtectedDataEncryptionKeyCache.js +100 -86
- package/dist/commonjs/encryption/Cache/ProtectedDataEncryptionKeyCache.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyProperties.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyProperties.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyRequest.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyRequest.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js +35 -16
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/commonjs/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/index.js +28 -8
- package/dist/commonjs/encryption/ClientEncryptionKey/index.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionOptions.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionOptions.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionPolicy.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionPolicy.js.map +7 -1
- package/dist/commonjs/encryption/CosmosEncryptedNumber.js +32 -20
- package/dist/commonjs/encryption/CosmosEncryptedNumber.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionItemQueryIterator.js +130 -106
- package/dist/commonjs/encryption/EncryptionItemQueryIterator.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/DataEncryptionKey.js +52 -32
- package/dist/commonjs/encryption/EncryptionKey/DataEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/ProtectedDataEncryptionKey.js +37 -23
- package/dist/commonjs/encryption/EncryptionKey/ProtectedDataEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/index.js +31 -10
- package/dist/commonjs/encryption/EncryptionKey/index.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/AzureKeyVaultEncryptionKeyResolver.js +113 -94
- package/dist/commonjs/encryption/EncryptionKeyResolver/AzureKeyVaultEncryptionKeyResolver.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/EncryptionKeyResolver.js +16 -5
- package/dist/commonjs/encryption/EncryptionKeyResolver/EncryptionKeyResolver.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.js +28 -8
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyStoreProvider.js +83 -55
- package/dist/commonjs/encryption/EncryptionKeyStoreProvider.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyWrapMetadata.js +16 -5
- package/dist/commonjs/encryption/EncryptionKeyWrapMetadata.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionManager.js +58 -42
- package/dist/commonjs/encryption/EncryptionManager.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionProcessor.js +346 -284
- package/dist/commonjs/encryption/EncryptionProcessor.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/commonjs/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/commonjs/encryption/EncryptionQueryBuilder.js +110 -99
- package/dist/commonjs/encryption/EncryptionQueryBuilder.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionSettingForProperty.js +65 -33
- package/dist/commonjs/encryption/EncryptionSettingForProperty.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionSettings.js +46 -30
- package/dist/commonjs/encryption/EncryptionSettings.js.map +7 -1
- package/dist/commonjs/encryption/KeyEncryptionKey.js +52 -28
- package/dist/commonjs/encryption/KeyEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.js +38 -18
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/FloatSerializer.js +40 -20
- package/dist/commonjs/encryption/Serializers/FloatSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/NumberSerializer.js +39 -19
- package/dist/commonjs/encryption/Serializers/NumberSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/Serializer.js +16 -5
- package/dist/commonjs/encryption/Serializers/Serializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/StringSerializer.js +34 -14
- package/dist/commonjs/encryption/Serializers/StringSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/index.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/index.js +37 -14
- package/dist/commonjs/encryption/Serializers/index.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionAlgorithm.js +31 -13
- package/dist/commonjs/encryption/enums/EncryptionAlgorithm.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionKeyResolverName.js +31 -12
- package/dist/commonjs/encryption/enums/EncryptionKeyResolverName.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionType.js +32 -16
- package/dist/commonjs/encryption/enums/EncryptionType.js.map +7 -1
- package/dist/commonjs/encryption/enums/KeyEncryptionAlgorithm.js +31 -12
- package/dist/commonjs/encryption/enums/KeyEncryptionAlgorithm.js.map +7 -1
- package/dist/commonjs/encryption/enums/TypeMarker.js +35 -14
- package/dist/commonjs/encryption/enums/TypeMarker.js.map +7 -1
- package/dist/commonjs/encryption/enums/index.js +37 -14
- package/dist/commonjs/encryption/enums/index.js.map +7 -1
- package/dist/commonjs/encryption/index.d.ts +5 -5
- package/dist/commonjs/encryption/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/index.js +56 -26
- package/dist/commonjs/encryption/index.js.map +7 -1
- package/dist/commonjs/extractPartitionKey.js +93 -91
- package/dist/commonjs/extractPartitionKey.js.map +7 -1
- package/dist/commonjs/globalEndpointManager.js +366 -357
- package/dist/commonjs/globalEndpointManager.js.map +7 -1
- package/dist/commonjs/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/commonjs/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/commonjs/globalPartitionEndpointManager.js +324 -297
- package/dist/commonjs/globalPartitionEndpointManager.js.map +7 -1
- package/dist/commonjs/index.d.ts +16 -16
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +178 -96
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/plugins/Plugin.js +51 -44
- package/dist/commonjs/plugins/Plugin.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/Aggregator.js +16 -3
- package/dist/commonjs/queryExecutionContext/Aggregators/Aggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/AverageAggregator.js +50 -29
- package/dist/commonjs/queryExecutionContext/Aggregators/AverageAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/CountAggregator.js +47 -26
- package/dist/commonjs/queryExecutionContext/Aggregators/CountAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/GlobalStatisticsAggregator.js +65 -54
- package/dist/commonjs/queryExecutionContext/Aggregators/GlobalStatisticsAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeListAggregator.js +39 -18
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeListAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeSetAggregator.js +47 -29
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeSetAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js +55 -38
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js +59 -43
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/StaticValueAggregator.js +35 -14
- package/dist/commonjs/queryExecutionContext/Aggregators/StaticValueAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/SumAggregator.js +45 -25
- package/dist/commonjs/queryExecutionContext/Aggregators/SumAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/index.js +64 -39
- package/dist/commonjs/queryExecutionContext/Aggregators/index.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +182 -166
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +46 -30
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +147 -124
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +71 -65
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js +39 -24
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/CosmosHeaders.js +16 -3
- package/dist/commonjs/queryExecutionContext/CosmosHeaders.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +113 -107
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +118 -107
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +169 -155
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +158 -143
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +85 -64
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +82 -58
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +72 -48
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +61 -42
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/emptyGroup.js +31 -13
- package/dist/commonjs/queryExecutionContext/EndpointComponent/emptyGroup.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ExecutionContext.js +16 -3
- package/dist/commonjs/queryExecutionContext/ExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/FetchResult.js +56 -38
- package/dist/commonjs/queryExecutionContext/FetchResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js +62 -55
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js +152 -155
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js +94 -102
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js +113 -89
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js +64 -66
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/SqlQuerySpec.js +16 -3
- package/dist/commonjs/queryExecutionContext/SqlQuerySpec.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js +220 -191
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/documentProducer.js +286 -276
- package/dist/commonjs/queryExecutionContext/documentProducer.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/headerUtils.js +95 -89
- package/dist/commonjs/queryExecutionContext/headerUtils.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js +499 -481
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/index.d.ts +2 -2
- package/dist/commonjs/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/index.js +62 -29
- package/dist/commonjs/queryExecutionContext/index.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResponse.js +16 -5
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResponse.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js +16 -5
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByComparator.js +107 -113
- package/dist/commonjs/queryExecutionContext/orderByComparator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js +145 -134
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js +91 -61
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js +86 -68
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js +842 -788
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js +36 -24
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js +286 -228
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +263 -299
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +94 -98
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +149 -177
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +105 -92
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +68 -55
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +52 -36
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js.map +7 -1
- package/dist/commonjs/queryIterator.js +411 -354
- package/dist/commonjs/queryIterator.js.map +7 -1
- package/dist/commonjs/queryMetrics/clientSideMetrics.js +49 -29
- package/dist/commonjs/queryMetrics/clientSideMetrics.js.map +7 -1
- package/dist/commonjs/queryMetrics/index.js +53 -19
- package/dist/commonjs/queryMetrics/index.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetrics.js +189 -159
- package/dist/commonjs/queryMetrics/queryMetrics.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetricsConstants.js +75 -57
- package/dist/commonjs/queryMetrics/queryMetricsConstants.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetricsUtils.js +52 -38
- package/dist/commonjs/queryMetrics/queryMetricsUtils.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryPreparationTime.js +110 -65
- package/dist/commonjs/queryMetrics/queryPreparationTime.js.map +7 -1
- package/dist/commonjs/queryMetrics/runtimeExecutionTimes.js +120 -68
- package/dist/commonjs/queryMetrics/runtimeExecutionTimes.js.map +7 -1
- package/dist/commonjs/queryMetrics/timeSpan.js +206 -217
- package/dist/commonjs/queryMetrics/timeSpan.js.map +7 -1
- package/dist/commonjs/request/ErrorResponse.js +46 -27
- package/dist/commonjs/request/ErrorResponse.js.map +7 -1
- package/dist/commonjs/request/FeedOptions.js +16 -3
- package/dist/commonjs/request/FeedOptions.js.map +7 -1
- package/dist/commonjs/request/FeedResponse.js +60 -40
- package/dist/commonjs/request/FeedResponse.js.map +7 -1
- package/dist/commonjs/request/RequestContext.js +16 -3
- package/dist/commonjs/request/RequestContext.js.map +7 -1
- package/dist/commonjs/request/RequestHandler.js +173 -153
- package/dist/commonjs/request/RequestHandler.js.map +7 -1
- package/dist/commonjs/request/RequestOptions.js +16 -3
- package/dist/commonjs/request/RequestOptions.js.map +7 -1
- package/dist/commonjs/request/ResourceResponse.js +49 -27
- package/dist/commonjs/request/ResourceResponse.js.map +7 -1
- package/dist/commonjs/request/Response.js +16 -3
- package/dist/commonjs/request/Response.js.map +7 -1
- package/dist/commonjs/request/SharedOptions.js +16 -3
- package/dist/commonjs/request/SharedOptions.js.map +7 -1
- package/dist/commonjs/request/StatusCodes.js +16 -5
- package/dist/commonjs/request/StatusCodes.js.map +7 -1
- package/dist/commonjs/request/TimeoutError.js +35 -16
- package/dist/commonjs/request/TimeoutError.js.map +7 -1
- package/dist/commonjs/request/defaultAgent.js +46 -18
- package/dist/commonjs/request/defaultAgent.js.map +7 -1
- package/dist/commonjs/request/globalStatistics.js +16 -5
- package/dist/commonjs/request/globalStatistics.js.map +7 -1
- package/dist/commonjs/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/commonjs/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/commonjs/request/hybridSearchQueryResult.js +62 -45
- package/dist/commonjs/request/hybridSearchQueryResult.js.map +7 -1
- package/dist/commonjs/request/index.d.ts +8 -8
- package/dist/commonjs/request/index.d.ts.map +1 -1
- package/dist/commonjs/request/index.js +37 -16
- package/dist/commonjs/request/index.js.map +7 -1
- package/dist/commonjs/request/request.js +188 -186
- package/dist/commonjs/request/request.js.map +7 -1
- package/dist/commonjs/retry/RetryContext.js +16 -3
- package/dist/commonjs/retry/RetryContext.js.map +7 -1
- package/dist/commonjs/retry/RetryPolicy.js +16 -3
- package/dist/commonjs/retry/RetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/bulkExecutionRetryPolicy.js +65 -56
- package/dist/commonjs/retry/bulkExecutionRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/defaultRetryPolicy.js +68 -115
- package/dist/commonjs/retry/defaultRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.js +98 -73
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/index.d.ts +1 -1
- package/dist/commonjs/retry/index.d.ts.map +1 -1
- package/dist/commonjs/retry/index.js +30 -12
- package/dist/commonjs/retry/index.js.map +7 -1
- package/dist/commonjs/retry/resourceThrottleRetryPolicy.js +74 -61
- package/dist/commonjs/retry/resourceThrottleRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/retryOptions.js +16 -3
- package/dist/commonjs/retry/retryOptions.js.map +7 -1
- package/dist/commonjs/retry/retryUtility.js +169 -133
- package/dist/commonjs/retry/retryUtility.js.map +7 -1
- package/dist/commonjs/retry/sessionRetryPolicy.js +84 -73
- package/dist/commonjs/retry/sessionRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.js +124 -119
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.js.map +7 -1
- package/dist/commonjs/routing/CollectionRoutingMapFactory.js +70 -67
- package/dist/commonjs/routing/CollectionRoutingMapFactory.js.map +7 -1
- package/dist/commonjs/routing/QueryRange.js +93 -66
- package/dist/commonjs/routing/QueryRange.js.map +7 -1
- package/dist/commonjs/routing/inMemoryCollectionRoutingMap.js +112 -84
- package/dist/commonjs/routing/inMemoryCollectionRoutingMap.js.map +7 -1
- package/dist/commonjs/routing/index.js +28 -10
- package/dist/commonjs/routing/index.js.map +7 -1
- package/dist/commonjs/routing/partitionKeyRangeCache.js +83 -56
- package/dist/commonjs/routing/partitionKeyRangeCache.js.map +7 -1
- package/dist/commonjs/routing/smartRoutingMapProvider.js +131 -110
- package/dist/commonjs/routing/smartRoutingMapProvider.js.map +7 -1
- package/dist/commonjs/session/SessionContext.js +16 -3
- package/dist/commonjs/session/SessionContext.js.map +7 -1
- package/dist/commonjs/session/VectorSessionToken.js +130 -125
- package/dist/commonjs/session/VectorSessionToken.js.map +7 -1
- package/dist/commonjs/session/sessionContainer.js +135 -127
- package/dist/commonjs/session/sessionContainer.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/SasToken.js +101 -120
- package/dist/commonjs/utils/SasToken.js.map +7 -1
- package/dist/commonjs/utils/atob.js +24 -7
- package/dist/commonjs/utils/atob.js.map +7 -1
- package/dist/commonjs/utils/batch.js +196 -197
- package/dist/commonjs/utils/batch.js.map +7 -1
- package/dist/commonjs/utils/cachedClient.js +32 -11
- package/dist/commonjs/utils/cachedClient.js.map +7 -1
- package/dist/commonjs/utils/checkURL.js +34 -14
- package/dist/commonjs/utils/checkURL.js.map +7 -1
- package/dist/commonjs/utils/diagnostics.js +107 -118
- package/dist/commonjs/utils/diagnostics.js.map +7 -1
- package/dist/commonjs/utils/digest.js +31 -10
- package/dist/commonjs/utils/digest.js.map +7 -1
- package/dist/commonjs/utils/encode.js +44 -23
- package/dist/commonjs/utils/encode.js.map +7 -1
- package/dist/commonjs/utils/envUtils.js +40 -10
- package/dist/commonjs/utils/envUtils.js.map +7 -1
- package/dist/commonjs/utils/fixedSizePriorityQueue.js +86 -55
- package/dist/commonjs/utils/fixedSizePriorityQueue.js.map +7 -1
- package/dist/commonjs/utils/globalCrypto.js +29 -10
- package/dist/commonjs/utils/globalCrypto.js.map +7 -1
- package/dist/commonjs/utils/hashObject.js +41 -11
- package/dist/commonjs/utils/hashObject.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/number.js +73 -56
- package/dist/commonjs/utils/hashing/encoding/number.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/prefix.js +50 -29
- package/dist/commonjs/utils/hashing/encoding/prefix.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/string.js +45 -27
- package/dist/commonjs/utils/hashing/encoding/string.js.map +7 -1
- package/dist/commonjs/utils/hashing/hash.d.ts +1 -1
- package/dist/commonjs/utils/hashing/hash.d.ts.map +1 -1
- package/dist/commonjs/utils/hashing/hash.js +55 -43
- package/dist/commonjs/utils/hashing/hash.js.map +7 -1
- package/dist/commonjs/utils/hashing/multiHash.js +29 -11
- package/dist/commonjs/utils/hashing/multiHash.js.map +7 -1
- package/dist/commonjs/utils/hashing/murmurHash.js +362 -412
- package/dist/commonjs/utils/hashing/murmurHash.js.map +7 -1
- package/dist/commonjs/utils/hashing/v1.js +101 -71
- package/dist/commonjs/utils/hashing/v1.js.map +7 -1
- package/dist/commonjs/utils/hashing/v2.js +84 -63
- package/dist/commonjs/utils/hashing/v2.js.map +7 -1
- package/dist/commonjs/utils/headers.js +45 -33
- package/dist/commonjs/utils/headers.js.map +7 -1
- package/dist/commonjs/utils/hmac.js +29 -8
- package/dist/commonjs/utils/hmac.js.map +7 -1
- package/dist/commonjs/utils/nonStreamingOrderByMap.js +64 -52
- package/dist/commonjs/utils/nonStreamingOrderByMap.js.map +7 -1
- package/dist/commonjs/utils/offers.js +36 -13
- package/dist/commonjs/utils/offers.js.map +7 -1
- package/dist/commonjs/utils/patch.js +33 -12
- package/dist/commonjs/utils/patch.js.map +7 -1
- package/dist/commonjs/utils/strings.js +28 -7
- package/dist/commonjs/utils/strings.js.map +7 -1
- package/dist/commonjs/utils/supportedQueryFeaturesBuilder.js +37 -16
- package/dist/commonjs/utils/supportedQueryFeaturesBuilder.js.map +7 -1
- package/dist/commonjs/utils/time.js +39 -30
- package/dist/commonjs/utils/time.js.map +7 -1
- package/dist/commonjs/utils/tracing.js +33 -17
- package/dist/commonjs/utils/tracing.js.map +7 -1
- package/dist/commonjs/utils/typeChecks.js +50 -60
- package/dist/commonjs/utils/typeChecks.js.map +7 -1
- package/dist/commonjs/utils/types.js +16 -5
- package/dist/commonjs/utils/types.js.map +7 -1
- package/dist/commonjs/utils/uint8.js +45 -24
- package/dist/commonjs/utils/uint8.js.map +7 -1
- package/dist/esm/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/esm/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/esm/PartitionKeyRangeFailoverInfo.js +0 -2
- package/dist/esm/PartitionKeyRangeFailoverInfo.js.map +1 -1
- package/dist/esm/bulk/index.d.ts +1 -1
- package/dist/esm/bulk/index.d.ts.map +1 -1
- package/dist/esm/bulk/index.js.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/esm/client/ChangeFeed/buildChangeFeedIterator.js.map +1 -1
- package/dist/esm/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/esm/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/changeFeedUtils.js.map +1 -1
- package/dist/esm/client/ChangeFeed/index.d.ts +2 -2
- package/dist/esm/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/index.js.map +1 -1
- package/dist/esm/client/ClientUtils.d.ts +1 -1
- package/dist/esm/client/ClientUtils.d.ts.map +1 -1
- package/dist/esm/client/ClientUtils.js.map +1 -1
- package/dist/esm/client/Conflict/index.d.ts +2 -2
- package/dist/esm/client/Conflict/index.d.ts.map +1 -1
- package/dist/esm/client/Conflict/index.js.map +1 -1
- package/dist/esm/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/esm/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/esm/client/Container/ContainerDefinition.js.map +1 -1
- package/dist/esm/client/Container/index.d.ts +4 -4
- package/dist/esm/client/Container/index.d.ts.map +1 -1
- package/dist/esm/client/Container/index.js.map +1 -1
- package/dist/esm/client/Database/index.d.ts +2 -2
- package/dist/esm/client/Database/index.d.ts.map +1 -1
- package/dist/esm/client/Database/index.js.map +1 -1
- package/dist/esm/client/Item/Items.d.ts.map +1 -1
- package/dist/esm/client/Item/Items.js.map +1 -1
- package/dist/esm/client/Item/index.d.ts +1 -1
- package/dist/esm/client/Item/index.d.ts.map +1 -1
- package/dist/esm/client/Item/index.js.map +1 -1
- package/dist/esm/client/Offer/index.d.ts +1 -1
- package/dist/esm/client/Offer/index.d.ts.map +1 -1
- package/dist/esm/client/Offer/index.js.map +1 -1
- package/dist/esm/client/Permission/index.d.ts +2 -2
- package/dist/esm/client/Permission/index.d.ts.map +1 -1
- package/dist/esm/client/Permission/index.js.map +1 -1
- package/dist/esm/client/StoredProcedure/index.d.ts +1 -1
- package/dist/esm/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/esm/client/StoredProcedure/index.js.map +1 -1
- package/dist/esm/client/Trigger/index.d.ts +1 -1
- package/dist/esm/client/Trigger/index.d.ts.map +1 -1
- package/dist/esm/client/Trigger/index.js.map +1 -1
- package/dist/esm/client/User/index.d.ts +1 -1
- package/dist/esm/client/User/index.d.ts.map +1 -1
- package/dist/esm/client/User/index.js.map +1 -1
- package/dist/esm/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/esm/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/esm/client/UserDefinedFunction/index.js.map +1 -1
- package/dist/esm/client/index.d.ts +1 -1
- package/dist/esm/client/index.d.ts.map +1 -1
- package/dist/esm/client/index.js +0 -1
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/common/constants.js +1 -1
- package/dist/esm/common/constants.js.map +1 -1
- package/dist/esm/common/helper.d.ts +4 -4
- package/dist/esm/common/helper.d.ts.map +1 -1
- package/dist/esm/common/helper.js.map +1 -1
- package/dist/esm/common/platform.d.ts +1 -1
- package/dist/esm/common/platform.d.ts.map +1 -1
- package/dist/esm/common/platform.js.map +1 -1
- package/dist/esm/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/esm/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/esm/diagnostics/DiagnosticNodeInternal.js.map +1 -1
- package/dist/esm/documents/index.d.ts +4 -4
- package/dist/esm/documents/index.d.ts.map +1 -1
- package/dist/esm/documents/index.js +0 -4
- package/dist/esm/documents/index.js.map +1 -1
- package/dist/esm/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +1 -1
- package/dist/esm/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -1
- package/dist/esm/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +1 -1
- package/dist/esm/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/esm/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/esm/encryption/ClientEncryptionIncludedPath.js.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/esm/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/esm/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/index.js.map +1 -1
- package/dist/esm/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/esm/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/esm/encryption/EncryptionKeyResolver/index.js.map +1 -1
- package/dist/esm/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/esm/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/esm/encryption/EncryptionQueryBuilder.js.map +1 -1
- package/dist/esm/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/esm/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/BooleanSerializer.js.map +1 -1
- package/dist/esm/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/esm/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/FloatSerializer.js.map +1 -1
- package/dist/esm/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/esm/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/StringSerializer.js.map +1 -1
- package/dist/esm/encryption/Serializers/index.d.ts +1 -1
- package/dist/esm/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/index.js.map +1 -1
- package/dist/esm/encryption/index.d.ts +5 -5
- package/dist/esm/encryption/index.d.ts.map +1 -1
- package/dist/esm/encryption/index.js.map +1 -1
- package/dist/esm/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/esm/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/esm/globalPartitionEndpointManager.js.map +1 -1
- package/dist/esm/index.d.ts +16 -16
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +26 -18
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +48 -25
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +17 -26
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js +13 -12
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/index.d.ts +2 -2
- package/dist/esm/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/index.js +0 -2
- package/dist/esm/queryExecutionContext/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +6 -5
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +2 -10
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -1
- package/dist/esm/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/esm/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/esm/request/hybridSearchQueryResult.js.map +1 -1
- package/dist/esm/request/index.d.ts +8 -8
- package/dist/esm/request/index.d.ts.map +1 -1
- package/dist/esm/request/index.js +0 -1
- package/dist/esm/request/index.js.map +1 -1
- package/dist/esm/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/esm/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/esm/retry/endpointDiscoveryRetryPolicy.js.map +1 -1
- package/dist/esm/retry/index.d.ts +1 -1
- package/dist/esm/retry/index.d.ts.map +1 -1
- package/dist/esm/retry/index.js +0 -3
- package/dist/esm/retry/index.js.map +1 -1
- package/dist/esm/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/esm/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/esm/retry/timeoutFailoverRetryPolicy.js.map +1 -1
- package/dist/esm/utils/hashing/hash.d.ts +1 -1
- package/dist/esm/utils/hashing/hash.d.ts.map +1 -1
- package/dist/esm/utils/hashing/hash.js.map +1 -1
- package/dist/react-native/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/react-native/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/react-native/PartitionKeyRangeFailoverInfo.js +0 -2
- package/dist/react-native/PartitionKeyRangeFailoverInfo.js.map +1 -1
- package/dist/react-native/bulk/index.d.ts +1 -1
- package/dist/react-native/bulk/index.d.ts.map +1 -1
- package/dist/react-native/bulk/index.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/buildChangeFeedIterator.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/index.d.ts +2 -2
- package/dist/react-native/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/index.js.map +1 -1
- package/dist/react-native/client/ClientUtils.d.ts +1 -1
- package/dist/react-native/client/ClientUtils.d.ts.map +1 -1
- package/dist/react-native/client/ClientUtils.js.map +1 -1
- package/dist/react-native/client/Conflict/index.d.ts +2 -2
- package/dist/react-native/client/Conflict/index.d.ts.map +1 -1
- package/dist/react-native/client/Conflict/index.js.map +1 -1
- package/dist/react-native/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/react-native/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/react-native/client/Container/ContainerDefinition.js.map +1 -1
- package/dist/react-native/client/Container/index.d.ts +4 -4
- package/dist/react-native/client/Container/index.d.ts.map +1 -1
- package/dist/react-native/client/Container/index.js.map +1 -1
- package/dist/react-native/client/Database/index.d.ts +2 -2
- package/dist/react-native/client/Database/index.d.ts.map +1 -1
- package/dist/react-native/client/Database/index.js.map +1 -1
- package/dist/react-native/client/Item/Items.d.ts.map +1 -1
- package/dist/react-native/client/Item/Items.js.map +1 -1
- package/dist/react-native/client/Item/index.d.ts +1 -1
- package/dist/react-native/client/Item/index.d.ts.map +1 -1
- package/dist/react-native/client/Item/index.js.map +1 -1
- package/dist/react-native/client/Offer/index.d.ts +1 -1
- package/dist/react-native/client/Offer/index.d.ts.map +1 -1
- package/dist/react-native/client/Offer/index.js.map +1 -1
- package/dist/react-native/client/Permission/index.d.ts +2 -2
- package/dist/react-native/client/Permission/index.d.ts.map +1 -1
- package/dist/react-native/client/Permission/index.js.map +1 -1
- package/dist/react-native/client/StoredProcedure/index.d.ts +1 -1
- package/dist/react-native/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/react-native/client/StoredProcedure/index.js.map +1 -1
- package/dist/react-native/client/Trigger/index.d.ts +1 -1
- package/dist/react-native/client/Trigger/index.d.ts.map +1 -1
- package/dist/react-native/client/Trigger/index.js.map +1 -1
- package/dist/react-native/client/User/index.d.ts +1 -1
- package/dist/react-native/client/User/index.d.ts.map +1 -1
- package/dist/react-native/client/User/index.js.map +1 -1
- package/dist/react-native/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/react-native/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/react-native/client/UserDefinedFunction/index.js.map +1 -1
- package/dist/react-native/client/index.d.ts +1 -1
- package/dist/react-native/client/index.d.ts.map +1 -1
- package/dist/react-native/client/index.js +0 -1
- package/dist/react-native/client/index.js.map +1 -1
- package/dist/react-native/common/constants.js +1 -1
- package/dist/react-native/common/constants.js.map +1 -1
- package/dist/react-native/common/helper.d.ts +4 -4
- package/dist/react-native/common/helper.d.ts.map +1 -1
- package/dist/react-native/common/helper.js.map +1 -1
- package/dist/react-native/common/platform.d.ts +1 -1
- package/dist/react-native/common/platform.d.ts.map +1 -1
- package/dist/react-native/common/platform.js.map +1 -1
- package/dist/react-native/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/react-native/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/react-native/diagnostics/DiagnosticNodeInternal.js.map +1 -1
- package/dist/react-native/documents/index.d.ts +4 -4
- package/dist/react-native/documents/index.d.ts.map +1 -1
- package/dist/react-native/documents/index.js +0 -4
- package/dist/react-native/documents/index.js.map +1 -1
- package/dist/react-native/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +1 -1
- package/dist/react-native/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -1
- package/dist/react-native/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/react-native/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionIncludedPath.js.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/react-native/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/react-native/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/index.js.map +1 -1
- package/dist/react-native/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/react-native/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/react-native/encryption/EncryptionKeyResolver/index.js.map +1 -1
- package/dist/react-native/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/react-native/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/react-native/encryption/EncryptionQueryBuilder.js.map +1 -1
- package/dist/react-native/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/BooleanSerializer.js.map +1 -1
- package/dist/react-native/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/FloatSerializer.js.map +1 -1
- package/dist/react-native/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/StringSerializer.js.map +1 -1
- package/dist/react-native/encryption/Serializers/index.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/index.js.map +1 -1
- package/dist/react-native/encryption/index.d.ts +5 -5
- package/dist/react-native/encryption/index.d.ts.map +1 -1
- package/dist/react-native/encryption/index.js.map +1 -1
- package/dist/react-native/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/react-native/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/react-native/globalPartitionEndpointManager.js.map +1 -1
- package/dist/react-native/index.d.ts +16 -16
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +26 -18
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +48 -25
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +17 -26
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js +13 -12
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/index.d.ts +2 -2
- package/dist/react-native/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/index.js +0 -2
- package/dist/react-native/queryExecutionContext/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +6 -5
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +2 -10
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -1
- package/dist/react-native/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/react-native/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/react-native/request/hybridSearchQueryResult.js.map +1 -1
- package/dist/react-native/request/index.d.ts +8 -8
- package/dist/react-native/request/index.d.ts.map +1 -1
- package/dist/react-native/request/index.js +0 -1
- package/dist/react-native/request/index.js.map +1 -1
- package/dist/react-native/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/react-native/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/react-native/retry/endpointDiscoveryRetryPolicy.js.map +1 -1
- package/dist/react-native/retry/index.d.ts +1 -1
- package/dist/react-native/retry/index.d.ts.map +1 -1
- package/dist/react-native/retry/index.js +0 -3
- package/dist/react-native/retry/index.js.map +1 -1
- package/dist/react-native/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/react-native/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/react-native/retry/timeoutFailoverRetryPolicy.js.map +1 -1
- package/dist/react-native/utils/globalCrypto.d.ts +1 -1
- package/dist/react-native/utils/globalCrypto.d.ts.map +1 -0
- package/dist/react-native/utils/globalCrypto.js +1 -1
- package/dist/react-native/utils/globalCrypto.js.map +1 -0
- package/dist/react-native/utils/hashing/hash.d.ts +1 -1
- package/dist/react-native/utils/hashing/hash.d.ts.map +1 -1
- package/dist/react-native/utils/hashing/hash.js.map +1 -1
- package/package.json +6 -23
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm-browser.d.mts.map +0 -1
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm-browser.mjs.map +0 -1
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache-browser.d.mts.map +0 -1
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache-browser.mjs.map +0 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey-browser.d.mts.map +0 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey-browser.mjs.map +0 -1
- package/dist/browser/request/defaultAgent-browser.d.mts.map +0 -1
- package/dist/browser/request/defaultAgent-browser.mjs.map +0 -1
- package/dist/browser/utils/atob-browser.d.mts.map +0 -1
- package/dist/browser/utils/atob-browser.mjs.map +0 -1
- package/dist/browser/utils/digest-browser.d.mts.map +0 -1
- package/dist/browser/utils/digest-browser.mjs.map +0 -1
- package/dist/browser/utils/envUtils-browser.d.mts.map +0 -1
- package/dist/browser/utils/envUtils-browser.mjs.map +0 -1
- package/dist/browser/utils/hmac-browser.d.mts.map +0 -1
- package/dist/browser/utils/hmac-browser.mjs.map +0 -1
- package/dist/react-native/utils/globalCrypto-react-native.d.mts.map +0 -1
- package/dist/react-native/utils/globalCrypto-react-native.mjs.map +0 -1
|
@@ -1,807 +1,861 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var parallelQueryExecutionContextBase_exports = {};
|
|
29
|
+
__export(parallelQueryExecutionContextBase_exports, {
|
|
30
|
+
ParallelQueryExecutionContextBase: () => ParallelQueryExecutionContextBase,
|
|
31
|
+
ParallelQueryExecutionContextBaseStates: () => ParallelQueryExecutionContextBaseStates
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(parallelQueryExecutionContextBase_exports);
|
|
34
|
+
var import_priorityqueuejs = __toESM(require("priorityqueuejs"));
|
|
35
|
+
var import_semaphore = __toESM(require("semaphore"));
|
|
36
|
+
var import_statusCodes = require("../common/statusCodes.js");
|
|
37
|
+
var import_ErrorResponse = require("../request/ErrorResponse.js");
|
|
38
|
+
var import_QueryRange = require("../routing/QueryRange.js");
|
|
39
|
+
var import_smartRoutingMapProvider = require("../routing/smartRoutingMapProvider.js");
|
|
40
|
+
var import_documentProducer = require("./documentProducer.js");
|
|
41
|
+
var import_headerUtils = require("./headerUtils.js");
|
|
42
|
+
var import_RidSkipCountFilter = require("./queryFilteringStrategy/RidSkipCountFilter.js");
|
|
43
|
+
var import_DiagnosticNodeInternal = require("../diagnostics/DiagnosticNodeInternal.js");
|
|
44
|
+
var import_parallelQueryResult = require("./parallelQueryResult.js");
|
|
45
|
+
var ParallelQueryExecutionContextBaseStates = /* @__PURE__ */ ((ParallelQueryExecutionContextBaseStates2) => {
|
|
46
|
+
ParallelQueryExecutionContextBaseStates2["started"] = "started";
|
|
47
|
+
ParallelQueryExecutionContextBaseStates2["inProgress"] = "inProgress";
|
|
48
|
+
ParallelQueryExecutionContextBaseStates2["ended"] = "ended";
|
|
49
|
+
return ParallelQueryExecutionContextBaseStates2;
|
|
50
|
+
})(ParallelQueryExecutionContextBaseStates || {});
|
|
26
51
|
class ParallelQueryExecutionContextBase {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Provides the ParallelQueryExecutionContextBase.
|
|
54
|
+
* This is the base class that ParallelQueryExecutionContext and OrderByQueryExecutionContext will derive from.
|
|
55
|
+
*
|
|
56
|
+
* When handling a parallelized query, it instantiates one instance of
|
|
57
|
+
* DocumentProcuder per target partition key range and aggregates the result of each.
|
|
58
|
+
*
|
|
59
|
+
* @param clientContext - The service endpoint to use to create the client.
|
|
60
|
+
* @param collectionLink - The Collection Link
|
|
61
|
+
* @param options - Represents the feed options.
|
|
62
|
+
* @param partitionedQueryExecutionInfo - PartitionedQueryExecutionInfo
|
|
63
|
+
* @hidden
|
|
64
|
+
*/
|
|
65
|
+
constructor(clientContext, collectionLink, query, options, partitionedQueryExecutionInfo, correlatedActivityId, rangeManager, queryProcessingStrategy, documentProducerComparator) {
|
|
66
|
+
this.clientContext = clientContext;
|
|
67
|
+
this.collectionLink = collectionLink;
|
|
68
|
+
this.query = query;
|
|
69
|
+
this.options = options;
|
|
70
|
+
this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;
|
|
71
|
+
this.correlatedActivityId = correlatedActivityId;
|
|
72
|
+
this.rangeManager = rangeManager;
|
|
73
|
+
this.queryProcessingStrategy = queryProcessingStrategy;
|
|
74
|
+
this.documentProducerComparator = documentProducerComparator;
|
|
75
|
+
this.clientContext = clientContext;
|
|
76
|
+
this.collectionLink = collectionLink;
|
|
77
|
+
this.query = query;
|
|
78
|
+
this.options = options;
|
|
79
|
+
this.partitionedQueryExecutionInfo = partitionedQueryExecutionInfo;
|
|
80
|
+
this.correlatedActivityId = correlatedActivityId;
|
|
81
|
+
this.diagnosticNodeWrapper = {
|
|
82
|
+
consumed: false,
|
|
83
|
+
diagnosticNode: new import_DiagnosticNodeInternal.DiagnosticNodeInternal(
|
|
84
|
+
clientContext.diagnosticLevel,
|
|
85
|
+
import_DiagnosticNodeInternal.DiagnosticNodeType.PARALLEL_QUERY_NODE,
|
|
86
|
+
null
|
|
87
|
+
)
|
|
88
|
+
};
|
|
89
|
+
this.diagnosticNodeWrapper.diagnosticNode.addData({ stateful: true });
|
|
90
|
+
this.err = void 0;
|
|
91
|
+
this.state = ParallelQueryExecutionContextBase.STATES.started;
|
|
92
|
+
this.routingProvider = new import_smartRoutingMapProvider.SmartRoutingMapProvider(this.clientContext);
|
|
93
|
+
this.buffer = [];
|
|
94
|
+
this.requestContinuation = options ? options.continuationToken || options.continuation : void 0;
|
|
95
|
+
if (this.requestContinuation && !this.options.enableQueryControl) {
|
|
96
|
+
throw new Error(
|
|
97
|
+
"Continuation tokens are supported when enableQueryControl is set true in FeedOptions"
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
this.respHeaders = (0, import_headerUtils.getInitialHeader)();
|
|
101
|
+
this.unfilledDocumentProducersQueue = new import_priorityqueuejs.default(
|
|
102
|
+
(a, b) => this.compareDocumentProducersByRange(a, b)
|
|
103
|
+
);
|
|
104
|
+
this.bufferedDocumentProducersQueue = new import_priorityqueuejs.default(
|
|
105
|
+
(a, b) => this.documentProducerComparator(b, a)
|
|
106
|
+
);
|
|
107
|
+
this.sem = (0, import_semaphore.default)(1);
|
|
108
|
+
this.sem.take(() => this._initializeDocumentProducers());
|
|
109
|
+
}
|
|
110
|
+
clientContext;
|
|
111
|
+
collectionLink;
|
|
112
|
+
query;
|
|
113
|
+
options;
|
|
114
|
+
partitionedQueryExecutionInfo;
|
|
115
|
+
correlatedActivityId;
|
|
116
|
+
rangeManager;
|
|
117
|
+
queryProcessingStrategy;
|
|
118
|
+
documentProducerComparator;
|
|
119
|
+
err;
|
|
120
|
+
state;
|
|
121
|
+
static STATES = ParallelQueryExecutionContextBaseStates;
|
|
122
|
+
routingProvider;
|
|
123
|
+
requestContinuation;
|
|
124
|
+
respHeaders;
|
|
125
|
+
unfilledDocumentProducersQueue;
|
|
126
|
+
bufferedDocumentProducersQueue;
|
|
127
|
+
// TODO: update type of buffer from any --> generic can be used here
|
|
128
|
+
buffer;
|
|
129
|
+
partitionDataPatchMap = /* @__PURE__ */ new Map();
|
|
130
|
+
patchCounter = 0;
|
|
131
|
+
updatedContinuationRanges = /* @__PURE__ */ new Map();
|
|
132
|
+
sem;
|
|
133
|
+
diagnosticNodeWrapper;
|
|
134
|
+
/**
|
|
135
|
+
* Determine if there are still remaining resources to processs based on the value of the continuation
|
|
136
|
+
* token or the elements remaining on the current batch in the QueryIterator.
|
|
137
|
+
* @returns true if there is other elements to process in the ParallelQueryExecutionContextBase.
|
|
138
|
+
*/
|
|
139
|
+
hasMoreResults() {
|
|
140
|
+
return !this.err && (this.buffer.length > 0 || this.state !== ParallelQueryExecutionContextBase.STATES.ended);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Fetches more results from the query execution context.
|
|
144
|
+
* @param diagnosticNode - Optional diagnostic node for tracing.
|
|
145
|
+
* @returns A promise that resolves to the fetched results.
|
|
146
|
+
* @hidden
|
|
147
|
+
*/
|
|
148
|
+
async fetchMore(diagnosticNode) {
|
|
149
|
+
await this.bufferDocumentProducers(diagnosticNode);
|
|
150
|
+
await this.fillBufferFromBufferQueue();
|
|
151
|
+
return this.drainBufferedItems();
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Processes buffered document producers
|
|
155
|
+
* @returns A promise that resolves when processing is complete.
|
|
156
|
+
*/
|
|
157
|
+
async processBufferedDocumentProducers() {
|
|
158
|
+
while (this.hasBufferedProducers() && this.shouldProcessBufferedProducers(this.isUnfilledQueueEmpty())) {
|
|
159
|
+
const producer = this.getNextBufferedProducer();
|
|
160
|
+
if (!producer) break;
|
|
161
|
+
await this.processDocumentProducer(producer);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Processes a single document producer using template method pattern.
|
|
166
|
+
* Common structure with query-specific processing delegated to subclasses.
|
|
167
|
+
*/
|
|
168
|
+
async processDocumentProducer(producer) {
|
|
169
|
+
const response = await this.fetchFromProducer(producer);
|
|
170
|
+
this._mergeWithActiveResponseHeaders(response.headers);
|
|
171
|
+
if (response.result) {
|
|
172
|
+
this.addToBuffer(response.result);
|
|
173
|
+
this.handlePartitionMapping(producer, response.result);
|
|
174
|
+
}
|
|
175
|
+
if (producer.peakNextItem() !== void 0) {
|
|
176
|
+
this.requeueProducer(producer);
|
|
177
|
+
} else if (producer.hasMoreResults()) {
|
|
178
|
+
this.moveToUnfilledQueue(producer);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Handles partition mapping updates - implemented in base class using template method pattern.
|
|
183
|
+
* Child classes provide query-specific parameters through abstract methods.
|
|
184
|
+
*/
|
|
185
|
+
handlePartitionMapping(producer, result) {
|
|
186
|
+
const itemCount = result?.length || 0;
|
|
187
|
+
const continuationToken = this.getContinuationToken(producer);
|
|
188
|
+
const mapping = {
|
|
189
|
+
itemCount,
|
|
190
|
+
partitionKeyRange: producer.targetPartitionKeyRange,
|
|
191
|
+
continuationToken
|
|
192
|
+
};
|
|
193
|
+
this.updatePartitionMapping(mapping);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Gets the continuation token to use - implemented by subclasses.
|
|
197
|
+
*/
|
|
198
|
+
getContinuationToken(producer) {
|
|
199
|
+
const hasMoreBufferedItems = producer.peakNextItem() !== void 0;
|
|
200
|
+
return hasMoreBufferedItems ? producer.previousContinuationToken : producer.continuationToken;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Updates partition mapping - creates new entry or merges with existing for ORDER BY queries.
|
|
204
|
+
*/
|
|
205
|
+
updatePartitionMapping(mapping) {
|
|
206
|
+
const currentPatch = this.partitionDataPatchMap.get(this.patchCounter.toString());
|
|
207
|
+
const isSamePartition = currentPatch?.partitionKeyRange?.id === mapping.partitionKeyRange.id;
|
|
208
|
+
if (isSamePartition && currentPatch) {
|
|
209
|
+
currentPatch.itemCount += mapping.itemCount;
|
|
210
|
+
currentPatch.continuationToken = mapping.continuationToken;
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
this.partitionDataPatchMap.set((++this.patchCounter).toString(), mapping);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Checks if the unfilled queue is empty (used by ORDER BY for processing control).
|
|
217
|
+
*/
|
|
218
|
+
isUnfilledQueueEmpty() {
|
|
219
|
+
return this.unfilledDocumentProducersQueue.size() === 0;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Initializes document producers and fills the priority queue.
|
|
223
|
+
* Handles both continuation token and fresh query scenarios.
|
|
224
|
+
*/
|
|
225
|
+
async _initializeDocumentProducers() {
|
|
226
|
+
try {
|
|
227
|
+
const targetPartitionRanges = await this._onTargetPartitionRanges();
|
|
228
|
+
const documentProducers = this.requestContinuation ? await this._createDocumentProducersFromContinuation(targetPartitionRanges) : this._createDocumentProducersFromFresh(targetPartitionRanges);
|
|
229
|
+
this._enqueueDocumentProducers(documentProducers);
|
|
230
|
+
this.sem.leave();
|
|
231
|
+
} catch (err) {
|
|
232
|
+
this.err = err;
|
|
233
|
+
this.sem.leave();
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Creates document producers from continuation token scenario.
|
|
238
|
+
*/
|
|
239
|
+
async _createDocumentProducersFromContinuation(targetPartitionRanges) {
|
|
240
|
+
const parsedToken = this._parseContinuationToken(this.requestContinuation);
|
|
241
|
+
const continuationRanges = await this._handlePartitionRangeChanges(parsedToken);
|
|
242
|
+
const additionalQueryInfo = this.queryProcessingStrategy.createAdditionalQueryInfo(parsedToken);
|
|
243
|
+
const filterResult = this.rangeManager.filterPartitionRanges(
|
|
244
|
+
targetPartitionRanges,
|
|
245
|
+
continuationRanges,
|
|
246
|
+
additionalQueryInfo
|
|
247
|
+
);
|
|
248
|
+
const rangeTokenPairs = filterResult.rangeTokenPairs;
|
|
249
|
+
const filterContext = this.queryProcessingStrategy.createFilterContext(parsedToken);
|
|
250
|
+
return rangeTokenPairs.map(
|
|
251
|
+
(rangeTokenPair) => this._createDocumentProducerFromRangeTokenPair(
|
|
252
|
+
rangeTokenPair,
|
|
253
|
+
continuationRanges,
|
|
254
|
+
filterContext
|
|
255
|
+
)
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Creates document producers from fresh query scenario (no continuation token).
|
|
260
|
+
*/
|
|
261
|
+
_createDocumentProducersFromFresh(targetPartitionRanges) {
|
|
262
|
+
return targetPartitionRanges.map(
|
|
263
|
+
(partitionTargetRange) => this._createTargetPartitionQueryExecutionContext(partitionTargetRange, void 0)
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Creates a document producer from a range token pair (continuation token scenario).
|
|
268
|
+
*/
|
|
269
|
+
_createDocumentProducerFromRangeTokenPair(rangeTokenPair, continuationRanges, filterContext) {
|
|
270
|
+
const partitionTargetRange = rangeTokenPair.range;
|
|
271
|
+
const continuationToken = rangeTokenPair.continuationToken;
|
|
272
|
+
const filterCondition = rangeTokenPair.filteringCondition || void 0;
|
|
273
|
+
const matchingContinuationRange = continuationRanges.find(
|
|
274
|
+
(cr) => cr.range.id === partitionTargetRange.id
|
|
275
|
+
);
|
|
276
|
+
const startEpk = matchingContinuationRange?.epkMin;
|
|
277
|
+
const endEpk = matchingContinuationRange?.epkMax;
|
|
278
|
+
const targetPartitionId = continuationRanges.length > 0 && continuationRanges[continuationRanges.length - 1].range ? continuationRanges[continuationRanges.length - 1].range.id : void 0;
|
|
279
|
+
const partitionFilterContext = this.queryProcessingStrategy.getPartitionFilterContext(
|
|
280
|
+
filterContext,
|
|
281
|
+
targetPartitionId,
|
|
282
|
+
partitionTargetRange.id
|
|
283
|
+
);
|
|
284
|
+
return this._createTargetPartitionQueryExecutionContext(
|
|
285
|
+
partitionTargetRange,
|
|
286
|
+
continuationToken,
|
|
287
|
+
startEpk,
|
|
288
|
+
endEpk,
|
|
289
|
+
!!(startEpk && endEpk),
|
|
290
|
+
// populateEpkRangeHeaders - true if both EPK values are present
|
|
291
|
+
filterCondition,
|
|
292
|
+
partitionFilterContext
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Enqueues document producers into the unfilled queue.
|
|
297
|
+
*/
|
|
298
|
+
_enqueueDocumentProducers(documentProducers) {
|
|
299
|
+
documentProducers.forEach((documentProducer) => {
|
|
300
|
+
try {
|
|
301
|
+
this.unfilledDocumentProducersQueue.enq(documentProducer);
|
|
302
|
+
} catch (e) {
|
|
303
|
+
this.err = e;
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Checks if there are buffered document producers ready for processing.
|
|
309
|
+
* Encapsulates queue size checking.
|
|
310
|
+
*/
|
|
311
|
+
hasBufferedProducers() {
|
|
312
|
+
return this.bufferedDocumentProducersQueue.size() > 0;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Gets the next buffered document producer for processing.
|
|
316
|
+
* Encapsulates queue dequeuing logic.
|
|
317
|
+
*/
|
|
318
|
+
getNextBufferedProducer() {
|
|
319
|
+
if (this.bufferedDocumentProducersQueue.size() > 0) {
|
|
320
|
+
return this.bufferedDocumentProducersQueue.deq();
|
|
321
|
+
}
|
|
322
|
+
return void 0;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Adds items to the result buffer. Handles both single items and arrays.
|
|
326
|
+
*/
|
|
327
|
+
addToBuffer(items) {
|
|
328
|
+
if (Array.isArray(items)) {
|
|
329
|
+
if (items.length > 0) {
|
|
330
|
+
this.buffer.push(...items);
|
|
331
|
+
}
|
|
332
|
+
} else if (items) {
|
|
333
|
+
this.buffer.push(items);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Moves a producer to the unfilled queue for later processing.
|
|
338
|
+
*/
|
|
339
|
+
moveToUnfilledQueue(producer) {
|
|
340
|
+
this.unfilledDocumentProducersQueue.enq(producer);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Re-queues a producer to the buffered queue for further processing.
|
|
344
|
+
*/
|
|
345
|
+
requeueProducer(producer) {
|
|
346
|
+
this.bufferedDocumentProducersQueue.enq(producer);
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Compares two document producers based on their partition key ranges and EPK values.
|
|
350
|
+
* Primary comparison: minInclusive values for left-to-right range traversal
|
|
351
|
+
* Secondary comparison: EPK ranges when minInclusive values are identical
|
|
352
|
+
* @param a - First document producer
|
|
353
|
+
* @param b - Second document producer
|
|
354
|
+
* @returns Comparison result for priority queue ordering
|
|
355
|
+
* @hidden
|
|
356
|
+
*/
|
|
357
|
+
compareDocumentProducersByRange(a, b) {
|
|
358
|
+
const aMinInclusive = a.targetPartitionKeyRange.minInclusive;
|
|
359
|
+
const bMinInclusive = b.targetPartitionKeyRange.minInclusive;
|
|
360
|
+
const minInclusiveComparison = bMinInclusive.localeCompare(aMinInclusive);
|
|
361
|
+
if (minInclusiveComparison === 0) {
|
|
362
|
+
const aMinEpk = a.startEpk;
|
|
363
|
+
const bMinEpk = b.startEpk;
|
|
364
|
+
if (aMinEpk && bMinEpk) {
|
|
365
|
+
return bMinEpk.localeCompare(aMinEpk);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return minInclusiveComparison;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Detects partition splits/merges by analyzing parsed continuation token ranges and comparing with current topology
|
|
372
|
+
* @param parsed - The continuation token containing range mappings to analyze
|
|
373
|
+
* @returns Array of processed ranges with EPK info
|
|
374
|
+
*/
|
|
375
|
+
async _handlePartitionRangeChanges(parsed) {
|
|
376
|
+
const processedRanges = [];
|
|
377
|
+
const rangeMappings = parsed.rangeMappings;
|
|
378
|
+
if (!rangeMappings || rangeMappings.length === 0) {
|
|
379
|
+
return [];
|
|
380
|
+
}
|
|
381
|
+
for (const rangeWithToken of rangeMappings) {
|
|
382
|
+
const range = rangeWithToken.queryRange;
|
|
383
|
+
const queryRange = new import_QueryRange.QueryRange(
|
|
384
|
+
range.min,
|
|
385
|
+
range.max,
|
|
386
|
+
true,
|
|
387
|
+
// isMinInclusive - assumption: always true
|
|
388
|
+
false
|
|
389
|
+
// isMaxInclusive - assumption: always false (max is exclusive)
|
|
390
|
+
);
|
|
391
|
+
const rangeMin = queryRange.min;
|
|
392
|
+
const rangeMax = queryRange.max;
|
|
393
|
+
const overlappingRanges = await this.routingProvider.getOverlappingRanges(
|
|
394
|
+
this.collectionLink,
|
|
395
|
+
[queryRange],
|
|
396
|
+
this.getDiagnosticNode()
|
|
397
|
+
);
|
|
398
|
+
if (overlappingRanges.length === 0) {
|
|
399
|
+
continue;
|
|
400
|
+
} else if (overlappingRanges.length === 1) {
|
|
401
|
+
const currentRange = overlappingRanges[0];
|
|
402
|
+
if (currentRange.minInclusive !== rangeMin || currentRange.maxExclusive !== rangeMax) {
|
|
403
|
+
await this._handleContinuationTokenMerge(rangeWithToken, currentRange);
|
|
404
|
+
processedRanges.push({
|
|
405
|
+
range: currentRange,
|
|
406
|
+
continuationToken: rangeWithToken.continuationToken,
|
|
407
|
+
epkMin: rangeMin,
|
|
408
|
+
// Original range min becomes EPK min
|
|
409
|
+
epkMax: rangeMax
|
|
410
|
+
// Original range max becomes EPK max
|
|
411
|
+
});
|
|
412
|
+
} else {
|
|
413
|
+
processedRanges.push({
|
|
414
|
+
range: currentRange,
|
|
415
|
+
continuationToken: rangeWithToken.continuationToken
|
|
416
|
+
});
|
|
215
417
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const continuationRanges = await this._handlePartitionRangeChanges(parsedToken);
|
|
224
|
-
// Use strategy to create additional query info from parsed token
|
|
225
|
-
const additionalQueryInfo = this.queryProcessingStrategy.createAdditionalQueryInfo(parsedToken);
|
|
226
|
-
const filterResult = this.rangeManager.filterPartitionRanges(targetPartitionRanges, continuationRanges, additionalQueryInfo);
|
|
227
|
-
// Extract ranges and tokens from the combined result
|
|
228
|
-
const rangeTokenPairs = filterResult.rangeTokenPairs;
|
|
229
|
-
// Use strategy to create filter context for continuation token processing
|
|
230
|
-
const filterContext = this.queryProcessingStrategy.createFilterContext(parsedToken);
|
|
231
|
-
return rangeTokenPairs.map((rangeTokenPair) => this._createDocumentProducerFromRangeTokenPair(rangeTokenPair, continuationRanges, filterContext));
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Creates document producers from fresh query scenario (no continuation token).
|
|
235
|
-
*/
|
|
236
|
-
_createDocumentProducersFromFresh(targetPartitionRanges) {
|
|
237
|
-
return targetPartitionRanges.map((partitionTargetRange) => this._createTargetPartitionQueryExecutionContext(partitionTargetRange, undefined));
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Creates a document producer from a range token pair (continuation token scenario).
|
|
241
|
-
*/
|
|
242
|
-
_createDocumentProducerFromRangeTokenPair(rangeTokenPair, continuationRanges, filterContext) {
|
|
243
|
-
const partitionTargetRange = rangeTokenPair.range;
|
|
244
|
-
const continuationToken = rangeTokenPair.continuationToken;
|
|
245
|
-
const filterCondition = rangeTokenPair.filteringCondition || undefined;
|
|
246
|
-
// Find EPK ranges for this partition range from processed continuation response
|
|
247
|
-
const matchingContinuationRange = continuationRanges.find((cr) => cr.range.id === partitionTargetRange.id);
|
|
248
|
-
const startEpk = matchingContinuationRange?.epkMin;
|
|
249
|
-
const endEpk = matchingContinuationRange?.epkMax;
|
|
250
|
-
// Use strategy to determine partition-specific filter context
|
|
251
|
-
const targetPartitionId = continuationRanges.length > 0 && continuationRanges[continuationRanges.length - 1].range
|
|
252
|
-
? continuationRanges[continuationRanges.length - 1].range.id
|
|
253
|
-
: undefined;
|
|
254
|
-
const partitionFilterContext = this.queryProcessingStrategy.getPartitionFilterContext(filterContext, targetPartitionId, partitionTargetRange.id);
|
|
255
|
-
return this._createTargetPartitionQueryExecutionContext(partitionTargetRange, continuationToken, startEpk, endEpk, !!(startEpk && endEpk), // populateEpkRangeHeaders - true if both EPK values are present
|
|
256
|
-
filterCondition, partitionFilterContext);
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Enqueues document producers into the unfilled queue.
|
|
260
|
-
*/
|
|
261
|
-
_enqueueDocumentProducers(documentProducers) {
|
|
262
|
-
documentProducers.forEach((documentProducer) => {
|
|
263
|
-
try {
|
|
264
|
-
this.unfilledDocumentProducersQueue.enq(documentProducer);
|
|
265
|
-
}
|
|
266
|
-
catch (e) {
|
|
267
|
-
this.err = e;
|
|
268
|
-
}
|
|
418
|
+
} else {
|
|
419
|
+
await this._handleContinuationTokenSplit(rangeWithToken, overlappingRanges);
|
|
420
|
+
overlappingRanges.forEach((rangeValue) => {
|
|
421
|
+
processedRanges.push({
|
|
422
|
+
range: rangeValue,
|
|
423
|
+
continuationToken: rangeWithToken.continuationToken
|
|
424
|
+
});
|
|
269
425
|
});
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return processedRanges;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Parses the continuation token based on query type
|
|
432
|
+
* @param continuationToken - The continuation token string to parse
|
|
433
|
+
* @returns Parsed continuation token object (ORDER BY or Parallel query token)
|
|
434
|
+
* @throws ErrorResponse when continuation token is malformed or cannot be parsed
|
|
435
|
+
*/
|
|
436
|
+
_parseContinuationToken(continuationToken) {
|
|
437
|
+
try {
|
|
438
|
+
return this.queryProcessingStrategy.parseContinuationToken(continuationToken);
|
|
439
|
+
} catch (e) {
|
|
440
|
+
throw new import_ErrorResponse.ErrorResponse(
|
|
441
|
+
`Invalid continuation token format. Expected token with rangeMappings property. Ensure the continuation token was generated by a compatible query and has not been modified.`
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Handles partition merge scenario for continuation token ranges
|
|
447
|
+
*/
|
|
448
|
+
async _handleContinuationTokenMerge(rangeWithToken, _newMergedRange) {
|
|
449
|
+
const rangeKey = `${rangeWithToken.queryRange.min}-${rangeWithToken.queryRange.max}`;
|
|
450
|
+
this.updatedContinuationRanges.set(rangeKey, {
|
|
451
|
+
oldRange: {
|
|
452
|
+
min: rangeWithToken.queryRange.min,
|
|
453
|
+
max: rangeWithToken.queryRange.max,
|
|
454
|
+
isMinInclusive: true,
|
|
455
|
+
// Assumption: min is always inclusive
|
|
456
|
+
isMaxInclusive: false
|
|
457
|
+
// Assumption: max is always exclusive
|
|
458
|
+
},
|
|
459
|
+
newRanges: [
|
|
460
|
+
{
|
|
461
|
+
min: rangeWithToken.queryRange.min,
|
|
462
|
+
max: rangeWithToken.queryRange.max,
|
|
463
|
+
isMinInclusive: true,
|
|
464
|
+
// Assumption: min is always inclusive
|
|
465
|
+
isMaxInclusive: false
|
|
466
|
+
// Assumption: max is always exclusive
|
|
285
467
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
468
|
+
],
|
|
469
|
+
continuationToken: rangeWithToken.continuationToken
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Handles partition split scenario for continuation token ranges
|
|
474
|
+
*/
|
|
475
|
+
async _handleContinuationTokenSplit(rangeWithToken, overlappingRanges) {
|
|
476
|
+
const rangeKey = `${rangeWithToken.queryRange.min}-${rangeWithToken.queryRange.max}`;
|
|
477
|
+
this.updatedContinuationRanges.set(rangeKey, {
|
|
478
|
+
oldRange: {
|
|
479
|
+
min: rangeWithToken.queryRange.min,
|
|
480
|
+
max: rangeWithToken.queryRange.max,
|
|
481
|
+
isMinInclusive: true,
|
|
482
|
+
// Assumption: min is always inclusive
|
|
483
|
+
isMaxInclusive: false
|
|
484
|
+
// Assumption: max is always exclusive
|
|
485
|
+
},
|
|
486
|
+
newRanges: overlappingRanges.map((range) => ({
|
|
487
|
+
min: range.minInclusive,
|
|
488
|
+
max: range.maxExclusive,
|
|
489
|
+
isMinInclusive: true,
|
|
490
|
+
isMaxInclusive: false
|
|
491
|
+
})),
|
|
492
|
+
continuationToken: rangeWithToken.continuationToken
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Handles partition merge scenario for continuation token ranges
|
|
497
|
+
*/
|
|
498
|
+
_mergeWithActiveResponseHeaders(headers) {
|
|
499
|
+
(0, import_headerUtils.mergeHeaders)(this.respHeaders, headers);
|
|
500
|
+
}
|
|
501
|
+
_getAndResetActiveResponseHeaders() {
|
|
502
|
+
const ret = this.respHeaders;
|
|
503
|
+
this.respHeaders = (0, import_headerUtils.getInitialHeader)();
|
|
504
|
+
return ret;
|
|
505
|
+
}
|
|
506
|
+
getDiagnosticNode() {
|
|
507
|
+
return this.diagnosticNodeWrapper.diagnosticNode;
|
|
508
|
+
}
|
|
509
|
+
async _onTargetPartitionRanges() {
|
|
510
|
+
const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges;
|
|
511
|
+
const queryRanges = parsedRanges.map((item) => import_QueryRange.QueryRange.parseFromDict(item));
|
|
512
|
+
return this.routingProvider.getOverlappingRanges(
|
|
513
|
+
this.collectionLink,
|
|
514
|
+
queryRanges,
|
|
515
|
+
this.getDiagnosticNode()
|
|
516
|
+
);
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Gets the replacement ranges for a partitionkeyrange that has been split
|
|
520
|
+
*/
|
|
521
|
+
async _getReplacementPartitionKeyRanges(documentProducer, diagnosticNode) {
|
|
522
|
+
const partitionKeyRange = documentProducer.targetPartitionKeyRange;
|
|
523
|
+
this.routingProvider = new import_smartRoutingMapProvider.SmartRoutingMapProvider(this.clientContext);
|
|
524
|
+
const queryRange = import_QueryRange.QueryRange.parsePartitionKeyRange(partitionKeyRange);
|
|
525
|
+
return this.routingProvider.getOverlappingRanges(
|
|
526
|
+
this.collectionLink,
|
|
527
|
+
[queryRange],
|
|
528
|
+
diagnosticNode
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
async _enqueueReplacementDocumentProducers(error, diagnosticNode, documentProducer) {
|
|
532
|
+
const replacementPartitionKeyRanges = await this._getReplacementPartitionKeyRanges(
|
|
533
|
+
documentProducer,
|
|
534
|
+
diagnosticNode
|
|
535
|
+
);
|
|
536
|
+
if (replacementPartitionKeyRanges.length === 0) {
|
|
537
|
+
throw error;
|
|
538
|
+
}
|
|
539
|
+
if (this.requestContinuation) {
|
|
540
|
+
this._updateContinuationTokenOnPartitionChange(
|
|
541
|
+
documentProducer,
|
|
542
|
+
replacementPartitionKeyRanges
|
|
543
|
+
);
|
|
544
|
+
}
|
|
545
|
+
if (replacementPartitionKeyRanges.length === 1) {
|
|
546
|
+
const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(
|
|
547
|
+
replacementPartitionKeyRanges[0],
|
|
548
|
+
documentProducer.continuationToken,
|
|
549
|
+
documentProducer.startEpk,
|
|
550
|
+
documentProducer.endEpk,
|
|
551
|
+
true
|
|
552
|
+
);
|
|
553
|
+
this.unfilledDocumentProducersQueue.enq(replacementDocumentProducer);
|
|
554
|
+
} else {
|
|
555
|
+
const replacementDocumentProducers = [];
|
|
556
|
+
replacementPartitionKeyRanges.forEach((partitionKeyRange) => {
|
|
557
|
+
const queryRange = import_QueryRange.QueryRange.parsePartitionKeyRange(partitionKeyRange);
|
|
558
|
+
const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(
|
|
559
|
+
partitionKeyRange,
|
|
560
|
+
documentProducer.continuationToken,
|
|
561
|
+
queryRange.min,
|
|
562
|
+
queryRange.max,
|
|
563
|
+
false
|
|
564
|
+
);
|
|
565
|
+
replacementDocumentProducers.push(replacementDocumentProducer);
|
|
566
|
+
});
|
|
567
|
+
replacementDocumentProducers.forEach((replacementDocumentProducer) => {
|
|
568
|
+
if (replacementDocumentProducer.hasMoreResults()) {
|
|
569
|
+
this.unfilledDocumentProducersQueue.enq(replacementDocumentProducer);
|
|
296
570
|
}
|
|
297
|
-
|
|
298
|
-
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
_updateContinuationTokenOnPartitionChange(originalDocumentProducer, replacementPartitionKeyRanges) {
|
|
575
|
+
const rangeWithToken = this._createQueryRangeWithContinuationToken(originalDocumentProducer);
|
|
576
|
+
if (replacementPartitionKeyRanges.length === 1) {
|
|
577
|
+
this._handleContinuationTokenMerge(rangeWithToken, replacementPartitionKeyRanges[0]);
|
|
578
|
+
} else {
|
|
579
|
+
this._handleContinuationTokenSplit(rangeWithToken, replacementPartitionKeyRanges);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Creates a QueryRangeWithContinuationToken object from a DocumentProducer.
|
|
584
|
+
* Uses the DocumentProducer's target partition key range and continuation token.
|
|
585
|
+
* @param documentProducer - The DocumentProducer to convert
|
|
586
|
+
* @returns QueryRangeWithContinuationToken object for token operations
|
|
587
|
+
*/
|
|
588
|
+
_createQueryRangeWithContinuationToken(documentProducer) {
|
|
589
|
+
const partitionRange = documentProducer.targetPartitionKeyRange;
|
|
590
|
+
const simplifiedQueryRange = {
|
|
591
|
+
min: documentProducer.startEpk || partitionRange.minInclusive,
|
|
592
|
+
max: documentProducer.endEpk || partitionRange.maxExclusive
|
|
593
|
+
};
|
|
594
|
+
return {
|
|
595
|
+
queryRange: simplifiedQueryRange,
|
|
596
|
+
continuationToken: documentProducer.continuationToken
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
static _needPartitionKeyRangeCacheRefresh(error) {
|
|
600
|
+
return error.code === import_statusCodes.StatusCodes.Gone && "substatus" in error && error["substatus"] === import_statusCodes.SubStatusCodes.PartitionKeyRangeGone;
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Replaces the format placeholder in the rewritten query with the provided filter condition.
|
|
604
|
+
* Handles both string queries and SqlQuerySpec objects.
|
|
605
|
+
*/
|
|
606
|
+
_replaceFormatPlaceholder(rewrittenQuery, formatPlaceHolder, filterCondition) {
|
|
607
|
+
const replacement = filterCondition ?? "true";
|
|
608
|
+
if (typeof rewrittenQuery === "object" && rewrittenQuery !== null && rewrittenQuery.query) {
|
|
609
|
+
return rewrittenQuery.query.replace(formatPlaceHolder, replacement);
|
|
610
|
+
}
|
|
611
|
+
return rewrittenQuery.replace(formatPlaceHolder, replacement);
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Creates target partition range Query Execution Context
|
|
615
|
+
*/
|
|
616
|
+
_createTargetPartitionQueryExecutionContext(partitionKeyTargetRange, continuationToken, startEpk, endEpk, populateEpkRangeHeaders, filterCondition, filterContext) {
|
|
617
|
+
const rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo?.rewrittenQuery;
|
|
618
|
+
let sqlQuerySpec;
|
|
619
|
+
const query = this.query;
|
|
620
|
+
if (typeof query === "string") {
|
|
621
|
+
sqlQuerySpec = { query };
|
|
622
|
+
} else {
|
|
623
|
+
sqlQuerySpec = query;
|
|
624
|
+
}
|
|
625
|
+
const formatPlaceHolder = "{documentdb-formattableorderbyquery-filter}";
|
|
626
|
+
if (rewrittenQuery) {
|
|
627
|
+
sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec));
|
|
628
|
+
const replacedQuery = this._replaceFormatPlaceholder(
|
|
629
|
+
rewrittenQuery,
|
|
630
|
+
formatPlaceHolder,
|
|
631
|
+
filterCondition
|
|
632
|
+
);
|
|
633
|
+
sqlQuerySpec["query"] = replacedQuery;
|
|
634
|
+
}
|
|
635
|
+
const options = { ...this.options };
|
|
636
|
+
options.continuationToken = continuationToken;
|
|
637
|
+
let filter;
|
|
638
|
+
if (filterContext) {
|
|
639
|
+
filter = new import_RidSkipCountFilter.RidSkipCountFilter(filterContext);
|
|
640
|
+
}
|
|
641
|
+
return new import_documentProducer.DocumentProducer(
|
|
642
|
+
this.clientContext,
|
|
643
|
+
this.collectionLink,
|
|
644
|
+
sqlQuerySpec,
|
|
645
|
+
partitionKeyTargetRange,
|
|
646
|
+
options,
|
|
647
|
+
this.correlatedActivityId,
|
|
648
|
+
startEpk,
|
|
649
|
+
endEpk,
|
|
650
|
+
populateEpkRangeHeaders,
|
|
651
|
+
filter
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
async drainBufferedItems() {
|
|
655
|
+
return new Promise((resolve, reject) => {
|
|
656
|
+
this.sem.take(() => {
|
|
657
|
+
if (this.err) {
|
|
658
|
+
this.sem.leave();
|
|
659
|
+
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
660
|
+
reject(this.err);
|
|
661
|
+
return;
|
|
299
662
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
* @returns Comparison result for priority queue ordering
|
|
320
|
-
* @hidden
|
|
321
|
-
*/
|
|
322
|
-
compareDocumentProducersByRange(a, b) {
|
|
323
|
-
const aMinInclusive = a.targetPartitionKeyRange.minInclusive;
|
|
324
|
-
const bMinInclusive = b.targetPartitionKeyRange.minInclusive;
|
|
325
|
-
const minInclusiveComparison = bMinInclusive.localeCompare(aMinInclusive);
|
|
326
|
-
// If minInclusive values are the same, check minEPK ranges if they exist
|
|
327
|
-
if (minInclusiveComparison === 0) {
|
|
328
|
-
const aMinEpk = a.startEpk;
|
|
329
|
-
const bMinEpk = b.startEpk;
|
|
330
|
-
if (aMinEpk && bMinEpk) {
|
|
331
|
-
return bMinEpk.localeCompare(aMinEpk);
|
|
332
|
-
}
|
|
663
|
+
if (this.buffer.length === 0) {
|
|
664
|
+
this.sem.leave();
|
|
665
|
+
const partitionDataPatchMap2 = this.partitionDataPatchMap;
|
|
666
|
+
this.partitionDataPatchMap = /* @__PURE__ */ new Map();
|
|
667
|
+
this.patchCounter = 0;
|
|
668
|
+
const updatedContinuationRanges2 = Object.fromEntries(
|
|
669
|
+
this.updatedContinuationRanges
|
|
670
|
+
);
|
|
671
|
+
this.updatedContinuationRanges.clear();
|
|
672
|
+
const result2 = (0, import_parallelQueryResult.createParallelQueryResult)(
|
|
673
|
+
[],
|
|
674
|
+
partitionDataPatchMap2,
|
|
675
|
+
updatedContinuationRanges2,
|
|
676
|
+
void 0
|
|
677
|
+
);
|
|
678
|
+
return resolve({
|
|
679
|
+
result: this.state === ParallelQueryExecutionContextBase.STATES.ended ? void 0 : result2,
|
|
680
|
+
headers: this._getAndResetActiveResponseHeaders()
|
|
681
|
+
});
|
|
333
682
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
false);
|
|
354
|
-
const rangeMin = queryRange.min;
|
|
355
|
-
const rangeMax = queryRange.max;
|
|
356
|
-
// Get current overlapping ranges for this continuation token range
|
|
357
|
-
const overlappingRanges = await this.routingProvider.getOverlappingRanges(this.collectionLink, [queryRange], this.getDiagnosticNode());
|
|
358
|
-
// Detect split/merge scenario based on the number of overlapping ranges
|
|
359
|
-
if (overlappingRanges.length === 0) {
|
|
360
|
-
continue;
|
|
361
|
-
}
|
|
362
|
-
else if (overlappingRanges.length === 1) {
|
|
363
|
-
// Check if it's the same range (no change) or a merge scenario
|
|
364
|
-
const currentRange = overlappingRanges[0];
|
|
365
|
-
if (currentRange.minInclusive !== rangeMin || currentRange.maxExclusive !== rangeMax) {
|
|
366
|
-
// Merge scenario - include EPK ranges from original continuation token range
|
|
367
|
-
await this._handleContinuationTokenMerge(rangeWithToken, currentRange);
|
|
368
|
-
processedRanges.push({
|
|
369
|
-
range: currentRange,
|
|
370
|
-
continuationToken: rangeWithToken.continuationToken,
|
|
371
|
-
epkMin: rangeMin, // Original range min becomes EPK min
|
|
372
|
-
epkMax: rangeMax, // Original range max becomes EPK max
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
else {
|
|
376
|
-
// Same range - no merge, no EPK ranges needed
|
|
377
|
-
processedRanges.push({
|
|
378
|
-
range: currentRange,
|
|
379
|
-
continuationToken: rangeWithToken.continuationToken,
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
// Split scenario - one range from continuation token now maps to multiple ranges
|
|
385
|
-
await this._handleContinuationTokenSplit(rangeWithToken, overlappingRanges);
|
|
386
|
-
// Add all overlapping ranges with the same continuation token to processed ranges
|
|
387
|
-
overlappingRanges.forEach((rangeValue) => {
|
|
388
|
-
processedRanges.push({
|
|
389
|
-
range: rangeValue,
|
|
390
|
-
continuationToken: rangeWithToken.continuationToken,
|
|
391
|
-
});
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
return processedRanges;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Parses the continuation token based on query type
|
|
399
|
-
* @param continuationToken - The continuation token string to parse
|
|
400
|
-
* @returns Parsed continuation token object (ORDER BY or Parallel query token)
|
|
401
|
-
* @throws ErrorResponse when continuation token is malformed or cannot be parsed
|
|
402
|
-
*/
|
|
403
|
-
_parseContinuationToken(continuationToken) {
|
|
404
|
-
try {
|
|
405
|
-
return this.queryProcessingStrategy.parseContinuationToken(continuationToken);
|
|
406
|
-
}
|
|
407
|
-
catch (e) {
|
|
408
|
-
throw new ErrorResponse_js_1.ErrorResponse(`Invalid continuation token format. Expected token with rangeMappings property. ` +
|
|
409
|
-
`Ensure the continuation token was generated by a compatible query and has not been modified.`);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Handles partition merge scenario for continuation token ranges
|
|
414
|
-
*/
|
|
415
|
-
async _handleContinuationTokenMerge(rangeWithToken, _newMergedRange) {
|
|
416
|
-
const rangeKey = `${rangeWithToken.queryRange.min}-${rangeWithToken.queryRange.max}`;
|
|
417
|
-
this.updatedContinuationRanges.set(rangeKey, {
|
|
418
|
-
oldRange: {
|
|
419
|
-
min: rangeWithToken.queryRange.min,
|
|
420
|
-
max: rangeWithToken.queryRange.max,
|
|
421
|
-
isMinInclusive: true, // Assumption: min is always inclusive
|
|
422
|
-
isMaxInclusive: false, // Assumption: max is always exclusive
|
|
423
|
-
},
|
|
424
|
-
newRanges: [
|
|
425
|
-
{
|
|
426
|
-
min: rangeWithToken.queryRange.min,
|
|
427
|
-
max: rangeWithToken.queryRange.max,
|
|
428
|
-
isMinInclusive: true, // Assumption: min is always inclusive
|
|
429
|
-
isMaxInclusive: false, // Assumption: max is always exclusive
|
|
430
|
-
},
|
|
431
|
-
],
|
|
432
|
-
continuationToken: rangeWithToken.continuationToken,
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Handles partition split scenario for continuation token ranges
|
|
437
|
-
*/
|
|
438
|
-
async _handleContinuationTokenSplit(rangeWithToken, overlappingRanges) {
|
|
439
|
-
const rangeKey = `${rangeWithToken.queryRange.min}-${rangeWithToken.queryRange.max}`;
|
|
440
|
-
this.updatedContinuationRanges.set(rangeKey, {
|
|
441
|
-
oldRange: {
|
|
442
|
-
min: rangeWithToken.queryRange.min,
|
|
443
|
-
max: rangeWithToken.queryRange.max,
|
|
444
|
-
isMinInclusive: true, // Assumption: min is always inclusive
|
|
445
|
-
isMaxInclusive: false, // Assumption: max is always exclusive
|
|
446
|
-
},
|
|
447
|
-
newRanges: overlappingRanges.map((range) => ({
|
|
448
|
-
min: range.minInclusive,
|
|
449
|
-
max: range.maxExclusive,
|
|
450
|
-
isMinInclusive: true,
|
|
451
|
-
isMaxInclusive: false,
|
|
452
|
-
})),
|
|
453
|
-
continuationToken: rangeWithToken.continuationToken,
|
|
683
|
+
const bufferedResults = this.buffer;
|
|
684
|
+
this.buffer = [];
|
|
685
|
+
const partitionDataPatchMap = this.partitionDataPatchMap;
|
|
686
|
+
this.partitionDataPatchMap = /* @__PURE__ */ new Map();
|
|
687
|
+
this.patchCounter = 0;
|
|
688
|
+
const updatedContinuationRanges = Object.fromEntries(
|
|
689
|
+
this.updatedContinuationRanges
|
|
690
|
+
);
|
|
691
|
+
this.updatedContinuationRanges.clear();
|
|
692
|
+
this.sem.leave();
|
|
693
|
+
const result = (0, import_parallelQueryResult.createParallelQueryResult)(
|
|
694
|
+
bufferedResults,
|
|
695
|
+
partitionDataPatchMap,
|
|
696
|
+
updatedContinuationRanges,
|
|
697
|
+
void 0
|
|
698
|
+
);
|
|
699
|
+
return resolve({
|
|
700
|
+
result,
|
|
701
|
+
headers: this._getAndResetActiveResponseHeaders()
|
|
454
702
|
});
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
// invokes the callback when the target partition ranges are ready
|
|
472
|
-
const parsedRanges = this.partitionedQueryExecutionInfo.queryRanges;
|
|
473
|
-
const queryRanges = parsedRanges.map((item) => QueryRange_js_1.QueryRange.parseFromDict(item));
|
|
474
|
-
return this.routingProvider.getOverlappingRanges(this.collectionLink, queryRanges, this.getDiagnosticNode());
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* Gets the replacement ranges for a partitionkeyrange that has been split
|
|
478
|
-
*/
|
|
479
|
-
async _getReplacementPartitionKeyRanges(documentProducer, diagnosticNode) {
|
|
480
|
-
const partitionKeyRange = documentProducer.targetPartitionKeyRange;
|
|
481
|
-
// Download the new routing map
|
|
482
|
-
this.routingProvider = new smartRoutingMapProvider_js_1.SmartRoutingMapProvider(this.clientContext);
|
|
483
|
-
// Get the queryRange that relates to this partitionKeyRange
|
|
484
|
-
const queryRange = QueryRange_js_1.QueryRange.parsePartitionKeyRange(partitionKeyRange);
|
|
485
|
-
return this.routingProvider.getOverlappingRanges(this.collectionLink, [queryRange], diagnosticNode);
|
|
486
|
-
}
|
|
487
|
-
async _enqueueReplacementDocumentProducers(error, diagnosticNode, documentProducer) {
|
|
488
|
-
// Get the replacement ranges
|
|
489
|
-
const replacementPartitionKeyRanges = await this._getReplacementPartitionKeyRanges(documentProducer, diagnosticNode);
|
|
490
|
-
if (replacementPartitionKeyRanges.length === 0) {
|
|
491
|
-
throw error;
|
|
492
|
-
}
|
|
493
|
-
if (this.requestContinuation) {
|
|
494
|
-
// Update composite continuation token to handle partition split
|
|
495
|
-
this._updateContinuationTokenOnPartitionChange(documentProducer, replacementPartitionKeyRanges);
|
|
703
|
+
});
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Buffers document producers based on the maximum degree of parallelism.
|
|
708
|
+
* Moves document producers from the unfilled queue to the buffered queue.
|
|
709
|
+
* @param diagnosticNode - The diagnostic node for logging and tracing.
|
|
710
|
+
* @returns A promise that resolves when buffering is complete.
|
|
711
|
+
*/
|
|
712
|
+
async bufferDocumentProducers(diagnosticNode) {
|
|
713
|
+
return new Promise((resolve, reject) => {
|
|
714
|
+
this.sem.take(async () => {
|
|
715
|
+
if (this.err) {
|
|
716
|
+
this.sem.leave();
|
|
717
|
+
reject(this.err);
|
|
718
|
+
return;
|
|
496
719
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
720
|
+
this.updateStates(this.err);
|
|
721
|
+
if (this.state === ParallelQueryExecutionContextBase.STATES.ended) {
|
|
722
|
+
this.sem.leave();
|
|
723
|
+
resolve();
|
|
724
|
+
return;
|
|
502
725
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
const queryRange = QueryRange_js_1.QueryRange.parsePartitionKeyRange(partitionKeyRange);
|
|
508
|
-
// Create replacment document producers with the parent's continuationToken
|
|
509
|
-
const replacementDocumentProducer = this._createTargetPartitionQueryExecutionContext(partitionKeyRange, documentProducer.continuationToken, queryRange.min, queryRange.max, false);
|
|
510
|
-
replacementDocumentProducers.push(replacementDocumentProducer);
|
|
511
|
-
});
|
|
512
|
-
// add document producers to the queue
|
|
513
|
-
replacementDocumentProducers.forEach((replacementDocumentProducer) => {
|
|
514
|
-
if (replacementDocumentProducer.hasMoreResults()) {
|
|
515
|
-
this.unfilledDocumentProducersQueue.enq(replacementDocumentProducer);
|
|
516
|
-
}
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
_updateContinuationTokenOnPartitionChange(originalDocumentProducer, replacementPartitionKeyRanges) {
|
|
521
|
-
const rangeWithToken = this._createQueryRangeWithContinuationToken(originalDocumentProducer);
|
|
522
|
-
if (replacementPartitionKeyRanges.length === 1) {
|
|
523
|
-
this._handleContinuationTokenMerge(rangeWithToken, replacementPartitionKeyRanges[0]);
|
|
726
|
+
if (this.unfilledDocumentProducersQueue.size() === 0) {
|
|
727
|
+
this.sem.leave();
|
|
728
|
+
resolve();
|
|
729
|
+
return;
|
|
524
730
|
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
// If rewrittenQuery has a query property, it's a SqlQuerySpec object
|
|
560
|
-
if (typeof rewrittenQuery === "object" && rewrittenQuery !== null && rewrittenQuery.query) {
|
|
561
|
-
return rewrittenQuery.query.replace(formatPlaceHolder, replacement);
|
|
562
|
-
}
|
|
563
|
-
// Otherwise, it's a string
|
|
564
|
-
return rewrittenQuery.replace(formatPlaceHolder, replacement);
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Creates target partition range Query Execution Context
|
|
568
|
-
*/
|
|
569
|
-
_createTargetPartitionQueryExecutionContext(partitionKeyTargetRange, continuationToken, startEpk, endEpk, populateEpkRangeHeaders, filterCondition, filterContext) {
|
|
570
|
-
const rewrittenQuery = this.partitionedQueryExecutionInfo.queryInfo?.rewrittenQuery;
|
|
571
|
-
let sqlQuerySpec;
|
|
572
|
-
const query = this.query;
|
|
573
|
-
if (typeof query === "string") {
|
|
574
|
-
sqlQuerySpec = { query };
|
|
575
|
-
}
|
|
576
|
-
else {
|
|
577
|
-
sqlQuerySpec = query;
|
|
578
|
-
}
|
|
579
|
-
const formatPlaceHolder = "{documentdb-formattableorderbyquery-filter}";
|
|
580
|
-
if (rewrittenQuery) {
|
|
581
|
-
sqlQuerySpec = JSON.parse(JSON.stringify(sqlQuerySpec));
|
|
582
|
-
const replacedQuery = this._replaceFormatPlaceholder(rewrittenQuery, formatPlaceHolder, filterCondition);
|
|
583
|
-
sqlQuerySpec["query"] = replacedQuery;
|
|
584
|
-
}
|
|
585
|
-
const options = { ...this.options };
|
|
586
|
-
options.continuationToken = continuationToken;
|
|
587
|
-
let filter;
|
|
588
|
-
if (filterContext) {
|
|
589
|
-
filter = new RidSkipCountFilter_js_1.RidSkipCountFilter(filterContext);
|
|
590
|
-
}
|
|
591
|
-
return new documentProducer_js_1.DocumentProducer(this.clientContext, this.collectionLink, sqlQuerySpec, partitionKeyTargetRange, options, this.correlatedActivityId, startEpk, endEpk, populateEpkRangeHeaders, filter);
|
|
592
|
-
}
|
|
593
|
-
async drainBufferedItems() {
|
|
594
|
-
return new Promise((resolve, reject) => {
|
|
595
|
-
this.sem.take(() => {
|
|
596
|
-
if (this.err) {
|
|
597
|
-
// if there is a prior error return error
|
|
598
|
-
this.sem.leave();
|
|
599
|
-
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
600
|
-
reject(this.err);
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
// return undefined if there is no more results
|
|
604
|
-
if (this.buffer.length === 0) {
|
|
605
|
-
this.sem.leave();
|
|
606
|
-
const partitionDataPatchMap = this.partitionDataPatchMap;
|
|
607
|
-
this.partitionDataPatchMap = new Map();
|
|
608
|
-
this.patchCounter = 0;
|
|
609
|
-
// Get and reset updated continuation ranges
|
|
610
|
-
const updatedContinuationRanges = Object.fromEntries(this.updatedContinuationRanges);
|
|
611
|
-
this.updatedContinuationRanges.clear();
|
|
612
|
-
const result = (0, parallelQueryResult_js_1.createParallelQueryResult)([], partitionDataPatchMap, updatedContinuationRanges, undefined);
|
|
613
|
-
return resolve({
|
|
614
|
-
result: this.state === ParallelQueryExecutionContextBase.STATES.ended ? undefined : result,
|
|
615
|
-
headers: this._getAndResetActiveResponseHeaders(),
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
// draing the entire buffer object and return that in result of return object
|
|
619
|
-
const bufferedResults = this.buffer;
|
|
620
|
-
this.buffer = [];
|
|
621
|
-
// reset the patchToRangeMapping
|
|
622
|
-
const partitionDataPatchMap = this.partitionDataPatchMap;
|
|
623
|
-
this.partitionDataPatchMap = new Map();
|
|
624
|
-
this.patchCounter = 0;
|
|
625
|
-
// Get and reset updated continuation ranges
|
|
626
|
-
const updatedContinuationRanges = Object.fromEntries(this.updatedContinuationRanges);
|
|
627
|
-
this.updatedContinuationRanges.clear();
|
|
628
|
-
// release the lock before returning
|
|
629
|
-
this.sem.leave();
|
|
630
|
-
const result = (0, parallelQueryResult_js_1.createParallelQueryResult)(bufferedResults, partitionDataPatchMap, updatedContinuationRanges, undefined);
|
|
631
|
-
return resolve({
|
|
632
|
-
result,
|
|
633
|
-
headers: this._getAndResetActiveResponseHeaders(),
|
|
634
|
-
});
|
|
635
|
-
});
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* Buffers document producers based on the maximum degree of parallelism.
|
|
640
|
-
* Moves document producers from the unfilled queue to the buffered queue.
|
|
641
|
-
* @param diagnosticNode - The diagnostic node for logging and tracing.
|
|
642
|
-
* @returns A promise that resolves when buffering is complete.
|
|
643
|
-
*/
|
|
644
|
-
async bufferDocumentProducers(diagnosticNode) {
|
|
645
|
-
return new Promise((resolve, reject) => {
|
|
646
|
-
this.sem.take(async () => {
|
|
647
|
-
if (this.err) {
|
|
648
|
-
this.sem.leave();
|
|
649
|
-
reject(this.err);
|
|
650
|
-
return;
|
|
651
|
-
}
|
|
652
|
-
this.updateStates(this.err);
|
|
653
|
-
if (this.state === ParallelQueryExecutionContextBase.STATES.ended) {
|
|
654
|
-
this.sem.leave();
|
|
655
|
-
resolve();
|
|
656
|
-
return;
|
|
657
|
-
}
|
|
658
|
-
if (this.unfilledDocumentProducersQueue.size() === 0) {
|
|
659
|
-
this.sem.leave();
|
|
660
|
-
resolve();
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
try {
|
|
664
|
-
const maxDegreeOfParallelism = this.options.maxDegreeOfParallelism === undefined ||
|
|
665
|
-
this.options.maxDegreeOfParallelism < 1
|
|
666
|
-
? this.unfilledDocumentProducersQueue.size() // number of partitions
|
|
667
|
-
: Math.min(this.options.maxDegreeOfParallelism, this.unfilledDocumentProducersQueue.size());
|
|
668
|
-
const documentProducers = [];
|
|
669
|
-
while (documentProducers.length < maxDegreeOfParallelism &&
|
|
670
|
-
this.unfilledDocumentProducersQueue.size() > 0) {
|
|
671
|
-
let documentProducer;
|
|
672
|
-
try {
|
|
673
|
-
documentProducer = this.unfilledDocumentProducersQueue.deq();
|
|
674
|
-
}
|
|
675
|
-
catch (e) {
|
|
676
|
-
this.err = e;
|
|
677
|
-
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
678
|
-
reject(this.err);
|
|
679
|
-
return;
|
|
680
|
-
}
|
|
681
|
-
documentProducers.push(documentProducer);
|
|
682
|
-
}
|
|
683
|
-
const bufferDocumentProducer = async (documentProducer) => {
|
|
684
|
-
try {
|
|
685
|
-
const headers = await documentProducer.bufferMore(diagnosticNode);
|
|
686
|
-
this._mergeWithActiveResponseHeaders(headers);
|
|
687
|
-
// Always track this document producer in patchToRangeMapping, even if it has no results
|
|
688
|
-
// This ensures we maintain a record of all partition ranges that were scanned
|
|
689
|
-
const nextItem = documentProducer.peakNextItem();
|
|
690
|
-
if (nextItem !== undefined) {
|
|
691
|
-
this.bufferedDocumentProducersQueue.enq(documentProducer);
|
|
692
|
-
}
|
|
693
|
-
else {
|
|
694
|
-
// Track document producer with no results in patchToRangeMapping
|
|
695
|
-
// This represents a scanned partition that yielded no results
|
|
696
|
-
// IMPORTANT: Only include if continuation token is NOT null/exhausted
|
|
697
|
-
// Document producers with no data in buffer and no continuation token are exhausted and should not be added to partitionDataPatchMap to prevent infinite loops in order by queries
|
|
698
|
-
if (documentProducer.continuationToken &&
|
|
699
|
-
documentProducer.continuationToken !== "" &&
|
|
700
|
-
documentProducer.continuationToken.toLowerCase() !== "null") {
|
|
701
|
-
const patchKey = `empty-${documentProducer.targetPartitionKeyRange.id}-${documentProducer.targetPartitionKeyRange.minInclusive}`;
|
|
702
|
-
this.partitionDataPatchMap.set(patchKey, {
|
|
703
|
-
itemCount: 0, // 0 items for empty result set
|
|
704
|
-
partitionKeyRange: documentProducer.targetPartitionKeyRange,
|
|
705
|
-
continuationToken: documentProducer.continuationToken,
|
|
706
|
-
});
|
|
707
|
-
}
|
|
708
|
-
if (documentProducer.hasMoreResults()) {
|
|
709
|
-
this.unfilledDocumentProducersQueue.enq(documentProducer);
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
}
|
|
713
|
-
catch (err) {
|
|
714
|
-
if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {
|
|
715
|
-
// We want the document producer enqueued
|
|
716
|
-
// So that later parts of the code can repair the execution context
|
|
717
|
-
// refresh the partition key ranges and ctreate new document producers and add it to the queue
|
|
718
|
-
await this._enqueueReplacementDocumentProducers(err, diagnosticNode, documentProducer);
|
|
719
|
-
resolve();
|
|
720
|
-
}
|
|
721
|
-
else {
|
|
722
|
-
this.err = err;
|
|
723
|
-
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
724
|
-
reject(err);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
};
|
|
728
|
-
try {
|
|
729
|
-
await Promise.all(documentProducers.map((producer) => bufferDocumentProducer(producer)));
|
|
730
|
-
}
|
|
731
|
-
catch (err) {
|
|
732
|
-
this.err = err;
|
|
733
|
-
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
734
|
-
reject(err);
|
|
735
|
-
return;
|
|
736
|
-
}
|
|
737
|
-
resolve();
|
|
738
|
-
}
|
|
739
|
-
catch (err) {
|
|
740
|
-
this.err = err;
|
|
741
|
-
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
742
|
-
reject(err);
|
|
743
|
-
}
|
|
744
|
-
finally {
|
|
745
|
-
this.sem.leave();
|
|
746
|
-
}
|
|
747
|
-
});
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* Drains the buffer of filled document producers and appends their items to the main buffer.
|
|
752
|
-
* Uses template method pattern - delegates actual processing to subclasses.
|
|
753
|
-
* @returns A promise that resolves when the buffer is filled.
|
|
754
|
-
*/
|
|
755
|
-
async fillBufferFromBufferQueue() {
|
|
756
|
-
return new Promise((resolve, reject) => {
|
|
757
|
-
this.sem.take(async () => {
|
|
758
|
-
if (this.err) {
|
|
759
|
-
// if there is a prior error return error
|
|
760
|
-
this.sem.leave();
|
|
761
|
-
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
762
|
-
reject(this.err);
|
|
763
|
-
return;
|
|
764
|
-
}
|
|
765
|
-
if (this.state === ParallelQueryExecutionContextBase.STATES.ended ||
|
|
766
|
-
this.bufferedDocumentProducersQueue.size() === 0) {
|
|
767
|
-
this.sem.leave();
|
|
768
|
-
resolve();
|
|
769
|
-
return;
|
|
770
|
-
}
|
|
771
|
-
try {
|
|
772
|
-
await this.processBufferedDocumentProducers();
|
|
773
|
-
this.updateStates(this.err);
|
|
774
|
-
}
|
|
775
|
-
catch (err) {
|
|
776
|
-
this.err = err;
|
|
777
|
-
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
778
|
-
reject(this.err);
|
|
779
|
-
return;
|
|
731
|
+
try {
|
|
732
|
+
const maxDegreeOfParallelism = this.options.maxDegreeOfParallelism === void 0 || this.options.maxDegreeOfParallelism < 1 ? this.unfilledDocumentProducersQueue.size() : Math.min(
|
|
733
|
+
this.options.maxDegreeOfParallelism,
|
|
734
|
+
this.unfilledDocumentProducersQueue.size()
|
|
735
|
+
);
|
|
736
|
+
const documentProducers = [];
|
|
737
|
+
while (documentProducers.length < maxDegreeOfParallelism && this.unfilledDocumentProducersQueue.size() > 0) {
|
|
738
|
+
let documentProducer;
|
|
739
|
+
try {
|
|
740
|
+
documentProducer = this.unfilledDocumentProducersQueue.deq();
|
|
741
|
+
} catch (e) {
|
|
742
|
+
this.err = e;
|
|
743
|
+
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
744
|
+
reject(this.err);
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
documentProducers.push(documentProducer);
|
|
748
|
+
}
|
|
749
|
+
const bufferDocumentProducer = async (documentProducer) => {
|
|
750
|
+
try {
|
|
751
|
+
const headers = await documentProducer.bufferMore(diagnosticNode);
|
|
752
|
+
this._mergeWithActiveResponseHeaders(headers);
|
|
753
|
+
const nextItem = documentProducer.peakNextItem();
|
|
754
|
+
if (nextItem !== void 0) {
|
|
755
|
+
this.bufferedDocumentProducersQueue.enq(documentProducer);
|
|
756
|
+
} else {
|
|
757
|
+
if (documentProducer.continuationToken && documentProducer.continuationToken !== "" && documentProducer.continuationToken.toLowerCase() !== "null") {
|
|
758
|
+
const patchKey = `empty-${documentProducer.targetPartitionKeyRange.id}-${documentProducer.targetPartitionKeyRange.minInclusive}`;
|
|
759
|
+
this.partitionDataPatchMap.set(patchKey, {
|
|
760
|
+
itemCount: 0,
|
|
761
|
+
// 0 items for empty result set
|
|
762
|
+
partitionKeyRange: documentProducer.targetPartitionKeyRange,
|
|
763
|
+
continuationToken: documentProducer.continuationToken
|
|
764
|
+
});
|
|
780
765
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
this.sem.leave();
|
|
766
|
+
if (documentProducer.hasMoreResults()) {
|
|
767
|
+
this.unfilledDocumentProducersQueue.enq(documentProducer);
|
|
784
768
|
}
|
|
769
|
+
}
|
|
770
|
+
} catch (err) {
|
|
771
|
+
if (ParallelQueryExecutionContextBase._needPartitionKeyRangeCacheRefresh(err)) {
|
|
772
|
+
await this._enqueueReplacementDocumentProducers(
|
|
773
|
+
err,
|
|
774
|
+
diagnosticNode,
|
|
775
|
+
documentProducer
|
|
776
|
+
);
|
|
785
777
|
resolve();
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
778
|
+
} else {
|
|
779
|
+
this.err = err;
|
|
780
|
+
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
781
|
+
reject(err);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
try {
|
|
786
|
+
await Promise.all(
|
|
787
|
+
documentProducers.map((producer) => bufferDocumentProducer(producer))
|
|
788
|
+
);
|
|
789
|
+
} catch (err) {
|
|
790
|
+
this.err = err;
|
|
791
|
+
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
792
|
+
reject(err);
|
|
794
793
|
return;
|
|
794
|
+
}
|
|
795
|
+
resolve();
|
|
796
|
+
} catch (err) {
|
|
797
|
+
this.err = err;
|
|
798
|
+
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
799
|
+
reject(err);
|
|
800
|
+
} finally {
|
|
801
|
+
this.sem.leave();
|
|
795
802
|
}
|
|
796
|
-
|
|
797
|
-
|
|
803
|
+
});
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Drains the buffer of filled document producers and appends their items to the main buffer.
|
|
808
|
+
* Uses template method pattern - delegates actual processing to subclasses.
|
|
809
|
+
* @returns A promise that resolves when the buffer is filled.
|
|
810
|
+
*/
|
|
811
|
+
async fillBufferFromBufferQueue() {
|
|
812
|
+
return new Promise((resolve, reject) => {
|
|
813
|
+
this.sem.take(async () => {
|
|
814
|
+
if (this.err) {
|
|
815
|
+
this.sem.leave();
|
|
816
|
+
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
817
|
+
reject(this.err);
|
|
818
|
+
return;
|
|
798
819
|
}
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
820
|
+
if (this.state === ParallelQueryExecutionContextBase.STATES.ended || this.bufferedDocumentProducersQueue.size() === 0) {
|
|
821
|
+
this.sem.leave();
|
|
822
|
+
resolve();
|
|
823
|
+
return;
|
|
803
824
|
}
|
|
804
|
-
|
|
825
|
+
try {
|
|
826
|
+
await this.processBufferedDocumentProducers();
|
|
827
|
+
this.updateStates(this.err);
|
|
828
|
+
} catch (err) {
|
|
829
|
+
this.err = err;
|
|
830
|
+
this.err.headers = this._getAndResetActiveResponseHeaders();
|
|
831
|
+
reject(this.err);
|
|
832
|
+
return;
|
|
833
|
+
} finally {
|
|
834
|
+
this.sem.leave();
|
|
835
|
+
}
|
|
836
|
+
resolve();
|
|
837
|
+
return;
|
|
838
|
+
});
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
updateStates(error) {
|
|
842
|
+
if (error) {
|
|
843
|
+
this.err = error;
|
|
844
|
+
this.state = ParallelQueryExecutionContextBase.STATES.ended;
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
if (this.state === ParallelQueryExecutionContextBase.STATES.started) {
|
|
848
|
+
this.state = ParallelQueryExecutionContextBase.STATES.inProgress;
|
|
849
|
+
}
|
|
850
|
+
const hasNoActiveProducers = this.unfilledDocumentProducersQueue.size() === 0 && this.bufferedDocumentProducersQueue.size() === 0;
|
|
851
|
+
if (hasNoActiveProducers) {
|
|
852
|
+
this.state = ParallelQueryExecutionContextBase.STATES.ended;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
805
855
|
}
|
|
806
|
-
|
|
807
|
-
|
|
856
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
857
|
+
0 && (module.exports = {
|
|
858
|
+
ParallelQueryExecutionContextBase,
|
|
859
|
+
ParallelQueryExecutionContextBaseStates
|
|
860
|
+
});
|
|
861
|
+
//# sourceMappingURL=parallelQueryExecutionContextBase.js.map
|