Skip to content

Commit

Permalink
Support using a partition range id with Cosmos queries (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcallan authored Sep 5, 2023
1 parent 7cd9b80 commit bf5f2e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/data_cosmos/src/operations/query_documents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ operation! {
?consistency_level: ConsistencyLevel,
?parallelize_cross_partition_query: ParallelizeCrossPartition,
?query_cross_partition: QueryCrossPartition,
?partition_range_id: PartitionRangeId,
#[skip]
partition_key_serialized: String
}
Expand Down Expand Up @@ -75,6 +76,7 @@ impl QueryDocumentsBuilder {
}
request.insert_headers(&this.max_item_count.unwrap_or_default());
request.insert_headers(&this.query_cross_partition.unwrap_or_default());
request.insert_headers(&this.partition_range_id);

request.set_body(serde_json::to_vec(&this.query)?);
if let Some(partition_key_serialized) = this.partition_key_serialized.as_ref() {
Expand Down

0 comments on commit bf5f2e9

Please sign in to comment.