MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / connect_nodes

Method connect_nodes

demo/client/client.py:61–79  ·  view source on GitHub ↗

Connects source node to dest node with relation specify relation properties within args where args[i] i%2=0 is the prop name, and i%2=1 is prop value

(self, src_node, relation, dest_node, *args)

Source from the content-addressed store, hash-verified

59 return Node(node_id, label=label, *args)
60
61 def connect_nodes(self, src_node, relation, dest_node, *args):
62 """
63 Connects source node to dest node with relation
64 specify relation properties within
65 args where args[i] i%2=0 is
66 the prop name, and i%2=1 is prop value
67 """
68 resp = self.redis_con.execute_command(
69 "GRAPH.ADDEDGE",
70 self.graph,
71 src_node.id,
72 dest_node.id,
73 relation,
74 *args)
75
76 if resp == "OK":
77 return Edge(relation, *args)
78 else:
79 return None
80
81 def query(self, q):
82 """

Callers

nothing calls this directly

Calls 1

EdgeClass · 0.70

Tested by

no test coverage detected