RangePartitionResolver Class

RangePartitionResolver implements partitioning based on the ranges, allowing you to distribute requests and data across a number of partitions.

Inheritance
builtins.object
RangePartitionResolver

Constructor

RangePartitionResolver(partition_key_extractor, partition_map)

Parameters

partition_key_extractor
partition_map

Methods

ResolveForCreate

Resolves the collection for creating the document based on the partition key.

ResolveForRead

Resolves the collection for reading/querying the documents based on the partition key.

ResolveForCreate

Resolves the collection for creating the document based on the partition key.

ResolveForCreate(document)

Parameters

document
dict
Required

The document to be created.

Returns

Collection Self link or Name based link which should handle the Create operation.

Return type

str

ResolveForRead

Resolves the collection for reading/querying the documents based on the partition key.

ResolveForRead(partition_key)

Parameters

document
dict
Required

The document to be read/queried.

Returns

Collection Self link(s) or Name based link(s) which should handle the Read operation.

Return type