1
0
Fork 0
arangodb/Documentation/Books/Users/Edges
Aurelijus Banelis 3dce622c82 Documentation: How to update edge
From context it was confusing about changing type/edge/field of collection/document/edge.
It is very important to know, how to change edge,
as it is second most used operation in graph database (first is graph traversal).
2015-08-16 19:00:23 +03:00
..
README.mdpp Documentation: How to update edge 2015-08-16 19:00:23 +03:00

README.mdpp

!CHAPTER Edges, Identifiers, Handles

This is an introduction to ArangoDB's interface for edges and how to handle
edges from the JavaScript shell *arangosh*. For other languages see the
corresponding language API.

Edges in ArangoDB are special documents. In addition to the internal 
attributes *_key*, *_id* and *_rev*, they have two attributes *_from* and *_to*, 
which contain [document handles](../Glossary/index.html#document_handle), namely the start-point and the end-point of the edge.
The values of *_from* and *_to* are immutable once saved.

[Edge collections](../Glossary/index.html#edge_collection) are special collections that store edge documents. Edge documents 
are connection documents that reference other documents. The type of a collection 
must be specified when a collection is created and cannot be changed afterwards.

To change edge endpoints you would need to remove old document/edge and insert new one.
Other fields can be updated as in default collection.

!SECTION Working with Edges

!SUBSECTION Insert
<!-- arangod/V8Server/v8-collection.cpp -->
@startDocuBlock InsertEdgeCol

!SUBSECTION Edges
<!-- arangod/V8Server/v8-query.cpp -->
@startDocuBlock edgeCollectionEdges

!SUBSECTION InEdges
<!-- arangod/V8Server/v8-query.cpp -->
@startDocuBlock edgeCollectionInEdges

!SUBSECTION OutEdges
<!-- arangod/V8Server/v8-query.cpp -->
@startDocuBlock edgeCollectionOutEdges