@Override public Long indexGetOwningUniquenessConstraintId(StatementState state, IndexDescriptor index) throws SchemaRuleNotFoundException { return schemaStorage .indexRule(index.getLabelId(), index.getPropertyKeyId()) .getOwningConstraint(); }
private long indexId(IndexDescriptor descriptor) throws IndexNotFoundKernelException { try { return schemaStorage .indexRule(descriptor.getLabelId(), descriptor.getPropertyKeyId()) .getId(); } catch (SchemaRuleNotFoundException e) { throw new IndexNotFoundKernelException(e.getMessage(), e); } }
@Override public void constraintIndexDoDrop(IndexDescriptor descriptor) { constraintIndexChanges().remove(descriptor); getOrCreateLabelState(descriptor.getLabelId()).constraintIndexChanges().remove(descriptor); hasChanges = true; }
@Override public void constraintIndexRuleDoAdd(IndexDescriptor descriptor) { constraintIndexChanges().add(descriptor); getOrCreateLabelState(descriptor.getLabelId()).constraintIndexChanges().add(descriptor); hasChanges = true; }
@Override public long indexGetCommittedId(StatementState state, IndexDescriptor index) throws SchemaRuleNotFoundException { return schemaStorage.indexRule(index.getLabelId(), index.getPropertyKeyId()).getId(); }