(g)
| 125 | return drop_mandatory_constraint(g, "RELATIONSHIP", lbl, *props) |
| 126 | |
| 127 | def 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 |