Cosmos: Added Partition Key header option to Get and Replace document requests
@@ -57,6 +57,7 @@ impl GetDocumentRequest {
}
request_bytes_ref!(if_none_match, str, header::IF_NONE_MATCH);
+ request_bytes_ref!(partition_key, str, HEADER_DOCUMENTDB_PARTITIONKEY);
pub fn execute<T: DeserializeOwned>(mut self) -> impl Future<Item = GetDocumentResponse<T>, Error = AzureError> {
trace!("get_document called(request == {:?}", self.request);
@@ -138,7 +139,11 @@ impl QueryDocumentRequest {
request_option!(max_item_count, u64, HEADER_MAX_ITEM_COUNT);
request_bytes_ref!(continuation_token, str, HEADER_CONTINUATION);
request_option!(enable_cross_partition, bool, HEADER_DOCUMENTDB_QUERY_ENABLECROSSPARTITION);
- request_option!(enable_parallelize_cross_partition_query, bool, HEADER_DOCUMENTDB_QUERY_PARALLELIZECROSSPARTITIONQUERY);
+ request_option!(
+ enable_parallelize_cross_partition_query,
+ bool,
+ HEADER_DOCUMENTDB_QUERY_PARALLELIZECROSSPARTITIONQUERY
+ );
request_option!(consistency_level, ConsistencyLevel, HEADER_CONSISTENCY_LEVEL);
pub fn execute<T: DeserializeOwned>(self) -> impl Future<Item = QueryDocumentResponse<T>, Error = AzureError> {
@@ -343,6 +348,7 @@ impl<T: DeserializeOwned> ReplaceDocumentRequest<T> {
request_bytes_ref!(if_match, str, header::IF_MATCH);
request_option!(indexing_directive, IndexingDirective, HEADER_INDEXING_DIRECTIVE);
+ request_bytes_ref!(partition_key, str, HEADER_DOCUMENTDB_PARTITIONKEY);
pub fn execute(self) -> impl Future<Item = ReplaceDocumentResponse<T>, Error = AzureError> {
trace!("get_document called(request == {:?}", self.request);
