arangodb / arangodb-php

PHP ODM for ArangoDB
https://www.arangodb.com
Apache License 2.0
183 stars 43 forks source link

Multi-collection graphs #172

Closed F21 closed 7 years ago

F21 commented 10 years ago

With 2.2 on the horizon, we should probably start implementing multi-collection graphs if we find some time to do it :smile:

I think this might break BC.

mchacki commented 10 years ago

The old graph module will still be available in 2.2 without any changes in the API and will be maintained at least until 2.3. So you have some time to adapt to new graph module.

frankmayer commented 10 years ago

Hi Guys,

Fantastic! I've been anxiously waiting for this functionality in ArangoDB and will try to implement any necessary changes in ArangoDB-PHP this weekend after I've played a bit with 2.2 pre-release or maybe final?.

Greetings :smile:

F21 commented 10 years ago

:+1: Awesome! Then I can do the same in Paradox once it's done here :smile:

mchacki commented 10 years ago

Backend could should be done. We are now working on reflecting it in the Web Interface, this is still WIP.

If you like to play around just do:

var graph_module = require("org/arangodb/general-graph");
var graph = graph_module._create("myGraph");
var relation1 = graph_module._directedRelation("edges1", "vertices1", "vertices2");
graph._extendEdgeDefinitions(relation1);
var relation2 = graph_module._undirectedRelation("edges2", ["vertices1", "vertices2"]);
graph._extendEdgeDefinitions(relation2);

You then have a graph with 2 edge collections and 2 vertex collections.

Or you can use the REST API for it, which is a Foxx App called Gharial (a system app). Have fun ;)

frankmayer commented 7 years ago

Closing, as this has been implemented in the meantime.