Ejemplo n.º 1
0
 def setup(self, graph):
     try:
         graph.legacy.delete_index(Node, "People")
     except LookupError:
         pass
     self.people = graph.legacy.get_or_create_index(Node, "People")
     self.batch = LegacyWriteBatch(graph)
     self.graph = graph
Ejemplo n.º 2
0
 def setup(self, graph):
     try:
         graph.legacy.delete_index(Relationship, "Friendships")
     except LookupError:
         pass
     self.friendships = graph.legacy.get_or_create_index(
         Relationship, "Friendships")
     self.batch = LegacyWriteBatch(graph)
     self.graph = graph
Ejemplo n.º 3
0
 def setup(self, graph):
     self.graph = graph
     try:
         graph.legacy.delete_index(Node, "node_removal_test_index")
     except LookupError:
         pass
     self.index = graph.legacy.get_or_create_index(
         Node, "node_removal_test_index")
     self.fred, self.wilma, = graph.create(
         {"name": "Fred Flintstone"},
         {"name": "Wilma Flintstone"},
     )
     self.index.add("name", "Fred", self.fred)
     self.index.add("name", "Wilma", self.wilma)
     self.index.add("name", "Flintstone", self.fred)
     self.index.add("name", "Flintstone", self.wilma)
     self.index.add("flintstones", "%", self.fred)
     self.index.add("flintstones", "%", self.wilma)
     self.batch = LegacyWriteBatch(graph)
Ejemplo n.º 4
0
 def setup(self, graph):
     self.batch = LegacyWriteBatch(graph)