use of org.neo4j.kernel.api.schema_new.constaints.RelExistenceConstraintDescriptor in project neo4j by neo4j.
the class DataIntegrityValidatingStatementOperations method relationshipPropertyExistenceConstraintCreate.
@Override
public RelExistenceConstraintDescriptor relationshipPropertyExistenceConstraintCreate(KernelStatement state, RelationTypeSchemaDescriptor descriptor) throws AlreadyConstrainedException, CreateConstraintFailureException, RepeatedPropertyInCompositeSchemaException {
assertValidDescriptor(descriptor, OperationContext.CONSTRAINT_CREATION);
ConstraintDescriptor constraint = ConstraintDescriptorFactory.existsForSchema(descriptor);
assertConstraintDoesNotExist(state, constraint);
return schemaWriteDelegate.relationshipPropertyExistenceConstraintCreate(state, descriptor);
}
use of org.neo4j.kernel.api.schema_new.constaints.RelExistenceConstraintDescriptor in project neo4j by neo4j.
the class StateHandlingStatementOperations method relationshipPropertyExistenceConstraintCreate.
@Override
public RelExistenceConstraintDescriptor relationshipPropertyExistenceConstraintCreate(KernelStatement state, RelationTypeSchemaDescriptor descriptor) throws AlreadyConstrainedException, CreateConstraintFailureException {
RelExistenceConstraintDescriptor constraint = ConstraintDescriptorFactory.existsForSchema(descriptor);
state.txState().constraintDoAdd(constraint);
return constraint;
}
Aggregations