use of org.neo4j.kernel.impl.transaction.state.PropertyRecordChange in project neo4j by neo4j.
the class PropertyPhysicalToLogicalConverter method mapBlocks.
private long mapBlocks(long nodeId, Iterable<PropertyRecordChange> changes, Map<Integer, PropertyBlock> beforeMap, Map<Integer, PropertyBlock> afterMap) {
for (PropertyRecordChange change : changes) {
equalCheck(change.getBefore().getNodeId(), nodeId);
equalCheck(change.getAfter().getNodeId(), nodeId);
mapBlocks(change.getBefore(), beforeMap);
mapBlocks(change.getAfter(), afterMap);
}
return nodeId;
}
use of org.neo4j.kernel.impl.transaction.state.PropertyRecordChange in project neo4j by neo4j.
the class PropertyPhysicalToLogicalConverterTest method shouldTreatPropertyThatMovedToAnotherRecordAsChange.
@Test
public void shouldTreatPropertyThatMovedToAnotherRecordAsChange() throws Exception {
// GIVEN
int key = 12;
String oldValue = "value1";
String newValue = "value two";
PropertyRecordChange movedFrom = change(propertyRecord(property(key, oldValue)), propertyRecord());
PropertyRecordChange movedTo = change(propertyRecord(), propertyRecord(property(key, newValue)));
// WHEN
NodeUpdates update = convert(none, none, movedFrom, movedTo);
// THEN
NodeUpdates expected = NodeUpdates.forNode(0).changed(key, oldValue, newValue).build();
assertEquals(expected, update);
}
Aggregations