use of org.neo4j.storageengine.api.schema.SchemaRule in project neo4j by neo4j.
the class TransactionRecordState method dropSchemaRule.
public void dropSchemaRule(SchemaRule rule) {
RecordProxy<Long, SchemaRecord, SchemaRule> change = recordChangeSet.getSchemaRuleChanges().getOrLoad(rule.getId(), rule);
SchemaRecord records = change.forChangingData();
for (DynamicRecord record : records) {
record.setInUse(false);
}
}
use of org.neo4j.storageengine.api.schema.SchemaRule in project neo4j by neo4j.
the class SchemaCacheTest method should_construct_schema_cache.
@Test
public void should_construct_schema_cache() {
// GIVEN
Collection<SchemaRule> rules = asList(hans, witch, gretel);
SchemaCache cache = new SchemaCache(new ConstraintSemantics(), rules);
// THEN
assertEquals(asSet(hans, gretel), Iterables.asSet(cache.indexRules()));
assertEquals(asSet(witch), Iterables.asSet(cache.constraintRules()));
}
Aggregations