"""Neo4j driver for regraph."""

from neo4j.v1 import GraphDatabase


class Neo4jDatabase(object):
    """Class implementing neo4j graph db driver."""

    def __init__(self, uri, user, password):
        """Initialize driver."""
        self._driver = GraphDatabase.driver(
            uri, auth=(user, password))
        self._graphs = set()

    def close(self):
        """Close connection."""
        self._driver.close()

@@ -62,16 +62,60 @@
 tabase%0A%0A
+from regraph.neo4j.graph import Neo4jGraph%0A%0A
 %0Aclass N
@@ -464,8 +464,340 @@
 close()%0A
+%0A    def access_graph(self, label):%0A        %22%22%22Add a graph to the database.%22%22%22%0A        if label in self._graphs:%0A            g = Neo4jGraph(label, self)%0A        else:%0A            self._graphs.update(label)%0A            g = Neo4jGraph(label, self, set_constraint=True)%0A            # Create a node in the hierarchy...%0A        return g%0A

Add access_graph method