Does the consistance of collections in a graph in ArangoDB guaranteed?

87 views Asked by At

Let say I have a collection node N and a edges collection E. Together , I created a graph G from N and E. In the document, Arango guarantee the consistency of graph G such as no dangling edges when nodes are deleted, etc. Does this consistency hold in situations such as:

  1. Used Foxx, delete 1 node (Thus making edges have 1 null in the _from and _to)
  2. Used Foxx, delete nodes using collection API (not using AQL)
  3. Used AQL, delete directly in nodes/edges collection without traversal

I asked this question due to the fact that my query does return some null value of nodes and I would like to understand more about this topic for inspection.

1

There are 1 answers

0
CodeManX On BEST ANSWER

Incoming and outgoing edges of a vertex are removed together with the vertex if you use the Graph API. You can use the General Graph module in Foxx and arangosh. Some drivers provide wrappers for this Graph API. The General Graph HTTP API is called Gharial.

If you remove vertices by other means, like a db or collection object in Foxx or arangosh, through the Web UI, with AQL or via HTTP endpoints for like DELETE /_api/document/{document-handle}, then you need to delete connected edges yourself or accept dangling edges.