6
votes

Can somebody help me with following issue. I'm writing custom FOXX app in ArangoDB and I need to create edge collection. With db._create("example"); I can create document collection, but I don't know how to change the type of it. I've tried db._create("example", {type: "edge"}); but it doesn't work.

In documentation is written

Collections have a type that is specified by the user when the collection is created. There are currently two types: document and edge. The default type is document.

How can I achieve that?

1

1 Answers

8
votes

db._createEdgeCollection("example");

Should solve your problem.

I suggest using the cheat sheet: https://www.arangodb.org/manuals/current/shell_reference_card.pdf