-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Labels
CosmosThe azure_cosmos crateThe azure_cosmos cratecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Feature Summary
Add ability to use the conditional update mode of the partial document update feature
Feature Description
The REST API supports this via condition
: https://learn.microsoft.com/en-us/rest/api/cosmos-db/patch-a-document#conditional-patch-operation
It seems like support could be added by introducing the condition
field as a String here:
azure-sdk-for-rust/sdk/cosmos/azure_data_cosmos/src/models/patch_operations.rs
Lines 41 to 43 in bbfd1b0
pub struct PatchDocument { | |
pub operations: Vec<PatchOperation>, | |
} |
Ideally, it wouldn't be a string, but also some kind of strongly-typed builder which produces the filter string, to prevent issues caused by typos in the SQL expression.
Use Case
Required for atomic conditional document updates
Alternatives
No response
Additional Context
No response
abey79, andrea-reale and rwincewicz-alianza
Metadata
Metadata
Assignees
Labels
CosmosThe azure_cosmos crateThe azure_cosmos cratecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that