Defining Neo4j Global Constraints

The following properties are applicable to a Neo4j Global Constraint object.

Tab

Section

Property

Description

Additional Information

    Database Specifies the database to which the global constraint belongs  
    If Not Exist Specifies that if the global constraint already exists, no exception is thrown, and no action happens  
    Generate Specifies whether a DDL statement is generated for the global constraint during forward engineering  

Parameters

Relationship List Relationships Specifies the relationship that the global constraint represents in case of relationship-type entity Available only when Entity Type under the Constraint Properties section is set to Relationship
Property List Properties Specifies the properties of the constraint  
Constraint Properties Type Specifies the type of the global constraint

Unique: Indicates that the property values are unique for all nodes with the specified label

Not Null: Indicates that a property exists for all the nodes or relationships with the specified label

Node Key: Indicates that for the specified label and set of properties:

  • All properties exist on all nodes with that label

  • The combination of the property values is unique

Entity Type Specifies the type of entity that the global constraint represents Available only when Type is set to Not Null
Label Specifies the label for the node on which the global constraint is created Not available when Type is set to Not Null and Entity Type is set to Relationship
LabelOrType Specifies the label or the relationship type of the global constraint  
Options Specifies the options passed to the CREATE command for the index associated with the global constraint Not available when Type is set to Not Null

Script

Specifies the CREATE command of the global constraint