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