apoc.schema.relationship.constraintExists
Function
apoc.schema.relationship.constraintExists(type String, propertyName [String])
- returns a boolean depending on whether or not a constraint exists for the given relationship type with the given property names.
Signature
apoc.schema.relationship.constraintExists(type :: STRING?, propertyName :: LIST? OF STRING?) :: (BOOLEAN?)
Usage Examples
The examples in this section are based on a database that has applied the following constraints:
CREATE CONSTRAINT likesDay
FOR ()-[like:LIKED]-()
REQUIRE (like.day) IS NOT NULL;
RETURN apoc.schema.relationship.constraintExists("LIKED", ["day"]) AS output;
output |
---|
TRUE |
Was this page helpful?