Search in sources :

Example 1 with InternalSchemaActions

use of org.neo4j.kernel.impl.coreapi.schema.InternalSchemaActions in project neo4j by neo4j.

the class SchemaWithPECAcceptanceTest method createUniquenessConstraint.

private ConstraintDefinition createUniquenessConstraint(Label label, String propertyKey) {
    SchemaHelper.createUniquenessConstraint(db, label, propertyKey);
    SchemaHelper.awaitIndexes(db);
    InternalSchemaActions actions = mock(InternalSchemaActions.class);
    IndexDefinition index = new IndexDefinitionImpl(actions, label, new String[] { propertyKey }, true);
    return new UniquenessConstraintDefinition(actions, index);
}
Also used : InternalSchemaActions(org.neo4j.kernel.impl.coreapi.schema.InternalSchemaActions) IndexDefinition(org.neo4j.graphdb.schema.IndexDefinition) UniquenessConstraintDefinition(org.neo4j.kernel.impl.coreapi.schema.UniquenessConstraintDefinition) IndexDefinitionImpl(org.neo4j.kernel.impl.coreapi.schema.IndexDefinitionImpl)

Aggregations

IndexDefinition (org.neo4j.graphdb.schema.IndexDefinition)1 IndexDefinitionImpl (org.neo4j.kernel.impl.coreapi.schema.IndexDefinitionImpl)1 InternalSchemaActions (org.neo4j.kernel.impl.coreapi.schema.InternalSchemaActions)1 UniquenessConstraintDefinition (org.neo4j.kernel.impl.coreapi.schema.UniquenessConstraintDefinition)1