Next steps after DC2DC and Cluster doc improvements: - We refactor replication sections and make more intuitive separation between Master/Slave and the new Active Failover in 3.3 - We create corresponding sections for Master/Slave and Active Failover in the Administration and Deployment chapters, as well as in the Scalability chapter, where these "modes" are introduced - We touch and improve the "Architecture" chapter as well, where some architecture info have to be placed - We reorg the TOC having in more "logical" order: -- Deployment -- Administration -- Security -- Monitoring -- Troubleshooting - We adds parts in the TOC - We add toc per pages, using page-toc plugin - We also put close together "Scalability" and "Architecture" chapters, preliminary steps of further improvements / aggregation - We improve swagger Internal Ref: - https://github.com/arangodb/planning/issues/1692 - https://github.com/arangodb/planning/issues/1655 - https://github.com/arangodb/planning/issues/1858 - https://github.com/arangodb/planning/issues/973 (partial fix) - https://github.com/arangodb/planning/issues/1498 (partial fix) |
||
---|---|---|
.. | ||
Functions.md | ||
Management.md | ||
README.md |
README.md
Graphs
This chapter describes the general-graph module. It allows you to define a graph that is spread across several edge and document collections. This allows you to structure your models in line with your domain and group them logically in collections giving you the power to query them in the same graph queries. There is no need to include the referenced collections within the query, this module will handle it for you.
Three Steps to create a graph
-
Create a graph
@startDocuBlockInline generalGraphCreateGraphHowTo1 @EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraphHowTo1} var graph_module = require("@arangodb/general-graph"); var graph = graph_module._create("myGraph"); graph; ~ graph_module._drop("myGraph", true); @END_EXAMPLE_ARANGOSH_OUTPUT @endDocuBlock generalGraphCreateGraphHowTo1
-
Add some vertex collections
@startDocuBlockInline generalGraphCreateGraphHowTo2 @EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraphHowTo2} ~ var graph_module = require("@arangodb/general-graph"); ~ var graph = graph_module._create("myGraph"); graph._addVertexCollection("shop"); graph._addVertexCollection("customer"); graph._addVertexCollection("pet"); graph; ~ graph_module._drop("myGraph", true); @END_EXAMPLE_ARANGOSH_OUTPUT @endDocuBlock generalGraphCreateGraphHowTo2
-
Define relations on the Graph
@startDocuBlockInline generalGraphCreateGraphHowTo3 @EXAMPLE_ARANGOSH_OUTPUT{generalGraphCreateGraphHowTo3} ~ var graph_module = require("@arangodb/general-graph"); ~ var graph = graph_module._create("myGraph"); ~ graph._addVertexCollection("pet"); var rel = graph_module._relation("isCustomer", ["shop"], ["customer"]); graph._extendEdgeDefinitions(rel); graph; ~ graph_module._drop("myGraph", true); @END_EXAMPLE_ARANGOSH_OUTPUT @endDocuBlock generalGraphCreateGraphHowTo3