azure-cosmosdb-gremlinapi

How to do distributed transaction cordination around SQL API and GraphDB in CosmosDB?

会有一股神秘感。 提交于 2019-12-02 08:30:10
I have a Customer container with items representing a single customer in SQL API (DocumentDB) in CosmosDB . I also have a Gremlin API (GraphDB) with the customers' shoppingcart data. Both these data are temporary/transient. The customer can choose clear shopping cart which will delete the temporary customer and the shoppingcart data. Currently I make separate calls, one to the SQL API (DocumentDB) and Gremlin API (GraphDB) which works but I want to do both as a transaction (ACID principle). To delete a customer , I call the Gremblin API and delete the shoppingcart data, then call the SQL API

Jagged Result Array Gremlin Query

喜夏-厌秋 提交于 2019-12-01 12:24:39
问题 Please may you help me to write a query that returns each source vertex in my traversal along with its associated edges and vertices as arrays on each such source vertex? In short, I need a result set comprising an array of 3-tuples with item 1 of each tuple being the source vertex and items 2 and 3 being the associated arrays. Thanks! EDIT 1: Expanded on the graph data and added my current problem query. EDIT 2: Improved Gremlin sample graph code (apologies, didn't think anyone would