Skip to content

Support CosmosDB conditional update #2963

@jprochazk

Description

@jprochazk

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:

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

Metadata

Metadata

Assignees

Labels

CosmosThe azure_cosmos cratecustomer-reportedIssues 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 that

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions