-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add support for partial updates to document #448
Comments
Hi @Szeraax - I just saw that too. I'm hoping the REST API's will be updated with this feature as well: https://docs.microsoft.com/en-us/rest/api/cosmos-db/ |
Closing for now at least. |
Hey @PlagueHO, am I reading this right that we now have PATCH capability in the API? https://learn.microsoft.com/en-us/rest/api/cosmos-db/patch-a-document |
Looks like it is supported now and it requires that you use the Patch method with an array of operations. I think the best way to go about implementing this will be to add a PatchOperation type in our module class and then add a Here is the other document that is helpful to look at: https://learn.microsoft.com/en-us/azure/cosmos-db/partial-document-update Any guidance on my approach? Cool if I take a first pass at a PR or would you like me to do this in a different way? |
Regarding the PatchOperation type, I'd need some help creating that class, since I'm a c# noob at best. I guess a start would be: public class PatchOperation {
public System.String op { get; set; }
public System.String path { get; set; }
public System.Object value { get; set; }
} But we'd need to restrict the op to one of the supported operations like add, remove, set, etc. Not sure how to set a validation set in c#. The path would be a string and that's no problem. But the |
Announced today, Cosmos has partial update support: https://devblogs.microsoft.com/cosmosdb/partial-document-update-ga/
The text was updated successfully, but these errors were encountered: