1
0
Fork 0

some docu for orphan collections

This commit is contained in:
gschwab 2014-06-12 16:57:31 +02:00
parent 477cec53aa
commit 1ed179cbaa
2 changed files with 19 additions and 3 deletions

View File

@ -78,7 +78,23 @@ alternative call:
_key: "123"
};
```
!SUBSECTION Orphan Collections
Each graph has an orphan collection. It consists of arbitrary many vertex collection (type *document*), that are not
used in an edge definition of the graph. If the graph is extended with an edge definition, which is part of the orphan
collection, it will be removed from the orphan collection automatically.
!SUBSUBSECTION Add
<!-- @startDocuBlock JSF_general_graph__addOrphanCollection -->
!SUBSUBSECTION Read
<!-- @startDocuBlock JSF_general_graph__getOrphanCollections -->
!SUBSUBSECTION Remove
<!-- @startDocuBlock JSF_general_graph__removeOrphanCollection -->
!SUBSECTION Read a graph

View File

@ -2745,14 +2745,14 @@ Graph.prototype._addOrphanCollection = function(vertexCollection, createCollecti
};
////////////////////////////////////////////////////////////////////////////////
/// @startDocuBlock JSF_general_graph__getOrphanCollection
/// @startDocuBlock JSF_general_graph__getOrphanCollections
/// Returns all vertex collections of the graph, that are not used in an edge definition.
///
/// `general-graph._getOrphanCollections()`
///
/// @EXAMPLES
///
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__getVertexCollections}
/// @EXAMPLE_ARANGOSH_OUTPUT{general_graph__getOrphanCollections}
/// var examples = require("org/arangodb/graph-examples/example-graph.js");
/// var ed1 = examples._directedRelationDefinition("myEC1", ["myVC1"], ["myVC2"]);
/// var g = examples._create("myGraph", [ed1]);
@ -2787,7 +2787,7 @@ Graph.prototype._getOrphanCollections = function() {
/// var g = examples._create("myGraph", [ed1]);
/// g._addOrphanCollection("myVC3, true);
/// g._addOrphanCollection("myVC4, true);
/// g._getVertexCollections();
/// g._getOrphanCollections();
/// g._removeOrphanCollection("myVC3");
/// g._getOrphanCollections();
/// @END_EXAMPLE_ARANGOSH_OUTPUT