IPartitionResolver Interface

 

Updated: June 30, 2017

Note: This API is now obsolete.

This represents a partition resolver for a database. Given a partition key, return the collection link(s) matching the partition key in the Azure DocumentDB database service.

Namespace:   Microsoft.Azure.Documents.Client
Assembly:  Microsoft.Azure.Documents.Client (in Microsoft.Azure.Documents.Client.dll)

No code example is currently available or this language may not be supported.

NameDescription
System_CAPS_pubmethodGetPartitionKey

Extracts the partition key from a document in the Azure DocumentDB database service.

System_CAPS_pubmethodResolveForCreate

Given a partition key, this returns the collection self-link for creating a document in the Azure DocumentDB database service.

System_CAPS_pubmethodResolveForRead

Given a partition key, this returns a list of collection self-links to read from.

Support for IPartitionResolver is now obsolete. It's recommended that you use Partitioned Collections for higher storage and throughput.

DocumentClient allows you to create and register IPartitionResolvers implementations for each database. Once registered, you can perform document operations directly against a database instead of a collection. IPartitionResolvers has just three methods ExtractPartitionKey, ResolveForCreate and ResolveForRead.

LINQ queries and ReadFeed iterators use the ResolveForRead internally to iterate over all the collections that match the partition key for the request. Similarly, create operations use the ResolveForCreate to route creates to the right partition. There are no changes required for Replace, Delete and Read since they use the Document, which already contains the reference to the collection that holds the document.

Return to top
Show: