-
Notifications
You must be signed in to change notification settings - Fork 65
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]: Include PATCH document operation to the connector #4972
[Feature]: Include PATCH document operation to the connector #4972
Comments
Hi, I'd like to work on this issue. |
My proposed solution for this is to include a new API with the following function signature. remote isolated function patchDocument(string databaseId, string containerId, string documentId, PatchOperation[] operations, int|float|decimal|string partitionKey, PatchRequestOptions? requestOptions = ()) returns DocumentResponse|error { } The public type PatchOperation record {
OperationType op;
string path;
anydata value;
};
enum OperationType {
ADD_PATCH_OPERATION = "add",
SET_PATCH_OPERATION = "set",
REPLACE_PATCH_OPERATION = "replace",
REMOVE_PATCH_OPERATION = "remove",
INCREMENT_PATCH_OPERATION = "increment",
MOVE_PATCH_OPERATION = "move"
} Please let me know your thoughts on this. |
Hi, Any updates on this? 👀 |
Hi @ImeshBalasuriya , The solution seems fine with some adjustments
Can improve the solution with these and you are good to go !! Note
|
Hi @sachinira, Thanks for the response! The Given that this addresses the second adjustment mentioned as well, I hope it is okay to proceed with the implementation as is. |
@ImeshBalasuriya are you still working on this issue? |
Hu @keizer619, Unfortunately, I'm a bit busy atm. If the feature is urgent, please feel free to reassign the issue. If not, I am happy to continue work on it once I am free. |
Can I work on this issue? |
Connector Name
module/cosmosdb (Cosmos DB)
Suggested feature
The patch methods are not implemented in the connector, but are available in the CosmosDB API: https://learn.microsoft.com/en-us/rest/api/cosmos-db/patch-a-document.
The "PATCH" operation allows to make partial updates to a document by specifying only the fields you want to change, leaving the rest of the document intact. This can be useful when we have a large document and only want to modify a few fields. The "PATCH" operation is also known as the "Partial Update" operation. Implement Patch Document method to include the document patch functionality to the connector
Discord : https://discord.com/channels/957996897782616114/1137459261551689861/1137459261551689861
Related issues
No response
The text was updated successfully, but these errors were encountered: