Reputation: 1517
Is that possible to get list of Constraints of the particular Label in Neo4j? For example, using call [someFunction] or something else.
Upvotes: 1
Views: 352
Reputation: 11216
Per the neo4j docs on constraints https://neo4j.com/docs/cypher-manual/current/schema/constraints/#constraints-get-a-list-of-all-constraints-in-the-database you can make a call to db.constraints()
and see if there is a constraint in the results for a particular label.
CALL db.constraints()
YIELD description AS desc
WHERE desc CONTAINS ':User'
RETURN desc
Upvotes: 3