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

Function list_constraints

tests/flow/constraint_utils.py:127–140  ·  view source on GitHub ↗
(g)

Source from the content-addressed store, hash-verified

125 return drop_mandatory_constraint(g, "RELATIONSHIP", lbl, *props)
126
127def list_constraints(g):
128 q = "CALL db.constraints() YIELD type, label, properties, entitytype, status"
129 results = g.query(q, read_only=True).result_set
130
131 constraints = []
132 for row in results:
133 t = row[0]
134 lbl = row[1]
135 attrs = row[2]
136 et = row[3]
137 status = row[4]
138 constraints.append(Constraint(t, et, lbl, attrs, status))
139
140 return constraints
141

Calls 2

ConstraintClass · 0.85
queryMethod · 0.45