DATA QUALITY: Please allow for properties to be set using a subquery
The use case here is incrementing the reply count property on a post vertex. To increment, we have to fetch the post vertex, increment the reply count property within our API, then update the graph with the new property value. Unfortunately, if multiple users reply simultaneously using different instances of our API, the reply count value is set incorrectly. Sending a query to the database and letting the server make the updates by calculating the value would address the issue.
Thank you for your suggestion.
At this time we are still investigating and evaluating this type of capability. This is on our backlog and we will continue to evaluate this with additional customer input. We will update this as this progresses.
Almén Lars commented
Had an idea that goes hand in hand with this one, so I deleted it and added a comment here instead, it's the same issue.
Currently, non-scalar values (such as traversals) are unsupported, making it impossible to use values from a traversal in creating or updating properties of vertexes and edges.
It would be fantastic to be able to:
* Use .coalesce() or .choose() to set boolean values depending on other properties.
* Increment properties inside query.
* Use a query like below (that goes back and forth a bit and uses values from the traversal inside the query) to get the properties of an edge/vertex and use them in upserting another edge/vertex properties.
(this query is simplified quite a bit, with no filters, no "upsert" pattern etc, but gets my point across I hope.)
Related GitHub issue:
Benjamin Hubert commented
This would be very useful. There was a github discussion on the subject ( https://github.com/Azure/azure-cosmos-dotnet-v2/issues/566 ) but it seems to have been forgotten as it is in the V2 github repo.