Skip to content

Commit 6b63cec

Browse files
committed
added createGraph(GraphEntity g) for isse #5
1 parent 6fea9a3 commit 6b63cec

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/main/java/com/arangodb/ArangoDriver.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,6 +3471,21 @@ public GraphEntity createGraph(
34713471
return graphDriver.createGraph(getDefaultDatabase(), graphName, edgeDefinitions, orphanCollections, waitForSync);
34723472
}
34733473

3474+
/**
3475+
* Creates a graph.
3476+
*
3477+
* @param graph The graph objet to be persistet.
3478+
* @param waitForSync Wait for sync.
3479+
* @return GraphEntity The new graph.
3480+
* @throws ArangoException
3481+
*/
3482+
public GraphEntity createGraph(GraphEntity graph, Boolean waitForSync) throws ArangoException {
3483+
String graphName = graph.getName();
3484+
List<EdgeDefinitionEntity> edgeDefinitions = graph.getEdgeDefinitions();
3485+
List<String> orphanCollections = graph.getOrphanCollections();
3486+
return graphDriver.createGraph(getDefaultDatabase(), graphName, edgeDefinitions, orphanCollections, waitForSync);
3487+
}
3488+
34743489
/**
34753490
* Creates an empty graph.
34763491
*

0 commit comments

Comments
 (0)