arangoclient.net icon indicating copy to clipboard operation
arangoclient.net copied to clipboard

Graph

Open francnuec opened this issue 8 years ago • 4 comments

Please, I don't seem to have it figured out but how do I use Arango's graph querying/traversal capabilities with this client and/or LINQ? An example would be great too.

francnuec avatar Dec 19 '16 14:12 francnuec

@francnuec graph query by LINQ can be found here:

https://github.com/ra0o0f/arangoclient.net/tree/next/src/ArangoDB.Client.Examples/Linq

working with graphs:

https://github.com/ra0o0f/arangoclient.net/blob/next/src/ArangoDB.Client.Examples/Graphs/GraphCommand.cs

traversal API:

https://github.com/ra0o0f/arangoclient.net/blob/next/src/ArangoDB.Client.Examples/Traversal/TraversalCommand.cs

ra0o0f avatar Dec 20 '16 08:12 ra0o0f

Thank you. Seeing the examples folder really helped me a lot.

However, say I have this neo4j cypher command:

MATCH (n:Actor)-[r:ACTED_IN]->(n2:Movie { title: 'The Matrix' })
RETURN n, r, n2

How can I achieve same with this ArangoDB client especially using LINQ and its where clauses too to filter in a single DB call? The Traversal command here only seems to consider just a Vertex, and an Edge. I want to know how I can match a particular complete relationship (vertex-edge-vertex) with conditions on one of the vertices.

I'm assuming your knowledge of neo4j. I'm sorry if wrong.

francnuec avatar Dec 20 '16 12:12 francnuec

Yes i agree, actually both sides of the edge have to be same type. It would be nice to define more like START-EDGE-END (I do not know how to deal with graphs which involves more different types)

But in the basic usage scenario this would be very helpfull

Hunter21007 avatar Feb 21 '17 15:02 Hunter21007

But i see, this is not easy, because there no any type information in the query result. :( All vertices are in the same collection

Hunter21007 avatar Feb 21 '17 15:02 Hunter21007