Package com.c8db

Interface C8Graph

    • Method Detail

      • db

        C8Database db()
        The the handler of the database the named graph is within
        Returns:
        database handler
      • name

        String name()
        The name of the graph
        Returns:
        graph name
      • exists

        boolean exists()
                throws C8DBException
        Checks whether the graph exists
        Returns:
        true if the graph exists, otherwise false
        Throws:
        C8DBException
      • drop

        void drop​(boolean dropCollections)
           throws C8DBException
        Deletes the graph from the database.
        Parameters:
        dropCollections - Drop collections of this graph as well. Collections will only be dropped if they are not used in other graphs.
        Throws:
        C8DBException
        See Also:
        API Documentation
      • addVertexCollection

        GraphEntity addVertexCollection​(String name)
                                 throws C8DBException
        Adds a vertex collection to the set of collections of the graph. If the collection does not exist, it will be created.
        Parameters:
        name - Name of the vertex collection
        Returns:
        information about the graph
        Throws:
        C8DBException
        See Also:
        API Documentation
      • vertexCollection

        C8VertexCollection vertexCollection​(String name)
        Returns a ArangoVertexCollection instance for the given vertex collection name.
        Parameters:
        name - Name of the vertex collection
        Returns:
        collection handler
      • edgeCollection

        C8EdgeCollection edgeCollection​(String name)
        Returns a ArangoEdgeCollection instance for the given edge collection name.
        Parameters:
        name - Name of the edge collection
        Returns:
        collection handler
      • replaceEdgeDefinition

        GraphEntity replaceEdgeDefinition​(EdgeDefinition definition)
                                   throws C8DBException
        Change one specific edge definition. This will modify all occurrences of this definition in all graphs known to your database
        Parameters:
        definition - The edge definition
        Returns:
        information about the graph
        Throws:
        C8DBException
        See Also:
        API Documentation
      • removeEdgeDefinition

        GraphEntity removeEdgeDefinition​(String definitionName)
                                  throws C8DBException
        Remove one edge definition from the graph. This will only remove the edge collection, the vertex collections remain untouched and can still be used in your queries
        Parameters:
        definitionName - The name of the edge collection used in the definition
        Returns:
        information about the graph
        Throws:
        C8DBException
        See Also:
        API Documentation