Beispiel #1
0
        /// <summary>
        /// Removes a vertex collection from this graph. If this collection is used in one ore
        /// more edge definitions it will not be dropped, if this option is set
        /// </summary>
        public ArangoGraph deleteVertexCollection(string colName, bool dropCollections)
        {
            ArangoGraph g = _graphGraphOps.deleteVertexCollection(colName, dropCollections);

            this.updateGraph(g);
            return(g);
        }
Beispiel #2
0
        /// <summary>
        /// Removes a vertex collection from this graph. The collection will not be dropped.
        /// </summary>
        public ArangoGraph deleteVertexCollection(string colName)
        {
            ArangoGraph g = _graphGraphOps.deleteVertexCollection(colName, false);

            this.updateGraph(g);
            return(g);
        }
Beispiel #3
0
        /// <summary>
        /// Adds a vertex collection to the graph.
        /// </summary>
        public ArangoGraph addVertexCollection(string colName)
        {
            ArangoGraph g = _graphGraphOps.addVertexCollection(colName);

            this.updateGraph(g);
            return(g);
        }
Beispiel #4
0
        /// <summary>
        /// Delete an existing edge definition of the graph. If dropCollection is true,
        /// the edge collection will be dropped. All vertex collections are moved to the orphanage
        /// if thy are used in one ore more edge definitions.
        /// </summary>
        public ArangoGraph deleteEdgeDefinition(string edgeCollectionName, bool dropCollection)
        {
            ArangoGraph g = _graphGraphOps.deleteEdgeDefinition(edgeCollectionName, dropCollection);

            this.updateGraph(g);
            return(g);
        }
Beispiel #5
0
        /// <summary>
        /// Update an existing edge definition of the graph.
        /// </summary>
        public ArangoGraph updateEdgeDefinition(ArangoGraphEdgeDefinition edgeDefinition)
        {
            ArangoGraph g = _graphGraphOps.updateEdgeDefinition(edgeDefinition);

            this.updateGraph(g);
            return(g);
        }
 public void Init()
 {
     Database.CreateTestDatabase(Database.TestDatabaseGeneral);
     db = Database.GetTestDatabase();
     List<ArangoGraphEdgeDefinition> eds = new List<ArangoGraphEdgeDefinition>();
     ed1 = new ArangoGraphEdgeDefinition(
         edgeCol1,
         new List<String>{fromCol1, fromCol2},
         new List<String>{toCol1, toCol2}
     );
     eds.Add(ed1);
     ed2 = new ArangoGraphEdgeDefinition(
         edgeCol2,
         new List<String>{fromCol2, fromCol3},
         new List<String>{toCol2, toCol3}
     );
     eds.Add(ed2);
     List<String> vertexCollections = new List<String>();
     vertexCollections.Add(vertexCol1);
     vertexCollections.Add(vertexCol2);
     vertexCollections.Add(vertexCol3);
     g = db.Graph.Create(graphName, eds, vertexCollections);
 }
Beispiel #7
0
 private void updateGraph(ArangoGraph g)
 {
     this.edgeDefinitions = g.edgeDefinitions;
     this.orphanCollections = g.orphanCollections;
 }
Beispiel #8
0
 private void updateGraph(ArangoGraph g)
 {
     this.edgeDefinitions   = g.edgeDefinitions;
     this.orphanCollections = g.orphanCollections;
 }