HashPartitionResolver.ResolveForRead(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Given a partition key, returns a list of collection links to read from using its hash in the Azure Cosmos DB service.
public virtual System.Collections.Generic.IEnumerable<string> ResolveForRead (object partitionKey);
abstract member ResolveForRead : obj -> seq<string>
override this.ResolveForRead : obj -> seq<string>
Public Overridable Function ResolveForRead (partitionKey As Object) As IEnumerable(Of String)
Parameters
- partitionKey
- Object
The partition key used to determine the target collections for reading. Must be a string.
Returns
The list of target collection links.
Implements
Exceptions
Thrown if the partition key is not a string.
Remarks
If partitionKey is null, then all collections are returned. The HashPartitionResolver supports only strings as partitionKeys. For other types, use ToString() or JsonConvert.SerializeObject() to convert to string.
Applies to
Azure SDK for .NET