use of org.neo4j.kernel.api.schema_new.OrderedPropertyValues in project neo4j by neo4j.
the class IndexTxStateUpdater method onPropertyRemove.
public void onPropertyRemove(KernelStatement state, NodeItem node, DefinedProperty before) throws EntityNotFoundException {
Iterator<NewIndexDescriptor> indexes = getIndexesInvolvingProperty(state, before.propertyKeyId());
nodeIndexMatcher.onMatchingSchema(state, indexes, node, before.propertyKeyId(), index -> {
OrderedPropertyValues values = getOrderedPropertyValues(state, node, before, index.schema().getPropertyIds());
state.txState().indexDoUpdateEntry(index.schema(), node.id(), values, null);
});
}
use of org.neo4j.kernel.api.schema_new.OrderedPropertyValues in project neo4j by neo4j.
the class IndexTxStateUpdater method onLabelChange.
public void onLabelChange(KernelStatement state, int labelId, NodeItem node, LabelChangeType changeType) throws EntityNotFoundException {
PrimitiveIntSet nodePropertyIds = Primitive.intSet();
nodePropertyIds.addAll(readOps.nodeGetPropertyKeys(state, node).iterator());
Iterator<NewIndexDescriptor> indexes = Iterators.concat(schemaReadOps.indexesGetForLabel(state, labelId), schemaReadOps.uniqueIndexesGetForLabel(state, labelId));
while (indexes.hasNext()) {
NewIndexDescriptor index = indexes.next();
int[] indexPropertyIds = index.schema().getPropertyIds();
if (nodeHasIndexProperties(nodePropertyIds, indexPropertyIds)) {
OrderedPropertyValues values = getOrderedPropertyValues(state, node, indexPropertyIds);
if (changeType == LabelChangeType.ADDED_LABEL) {
state.txState().indexDoUpdateEntry(index.schema(), node.id(), null, values);
} else {
state.txState().indexDoUpdateEntry(index.schema(), node.id(), values, null);
}
}
}
}
Aggregations