apoc.schema.relationship.constraintExists

Function APOC Core

RETURN apoc.schema.relationship.constraintExists(type, propertyNames)

Signature

apoc.schema.relationship.constraintExists(type :: STRING?, propertyName :: LIST? OF STRING?) :: (BOOLEAN?)

Input parameters

Name Type Default

type

STRING?

null

propertyName

LIST? OF STRING?

null

Usage Examples

The examples in this section are based on a database that has applied the following constraints:

CREATE CONSTRAINT likesDay
ON ()-[like:LIKED]-()
ASSERT EXISTS (like.day);
RETURN apoc.schema.relationship.constraintExists("LIKED", ["day"]) AS output;
Table 1. Results
output

TRUE