def __init__(self, root_uri=REXSTER_URI): self.config = Config(root_uri) self.resource = RexsterResource(self.config) self.gremlin = Gremlin(self.resource) self.indices = IndexProxy(RexsterIndex, resource) self.vertices = VertexProxy(Vertex, self.resource) self.vertices.index = self.indices.get("vertices", Vertex) self.edges = EdgeProxy(Edge, self.resource) self.edges.index = self.indices.get("edges", Edge)
def __init__(self, db_url=config.DATABASE_URL): self.resource = Resource(db_url) self.vertices = VertexProxy(self.resource) self.edges = EdgeProxy(self.resource) self.indices = IndexProxy(self.resource) self.gremlin = Gremlin(self.resource)
def _get_index_proxy(self): """Returns the index's proxy class.""" return IndexProxy(self.resource, self)