private Value committedValue( RelationshipState relState, int property, StorageRelationshipScanCursor relationship, StoragePropertyCursor properties ) { if ( state.relationshipIsAddedInThisTx( relState.getId() ) ) { return Values.NO_VALUE; } relationship.single( relState.getId() ); if ( !relationship.next() ) { return Values.NO_VALUE; } return committedValue( properties, relationship.propertiesReference(), property ); }
if ( relationship.next() ) properties.init( relationship.propertiesReference() ); while ( properties.next() )
private StorageProperty relAddProperty( long relationshipId, int key, Object value ) { StorageProperty property = new PropertyKeyValue( key, Values.of( value ) ); Value oldValue = Values.NO_VALUE; try ( StorageRelationshipScanCursor cursor = storageReader.allocateRelationshipScanCursor() ) { cursor.single( relationshipId ); if ( cursor.next() ) { StorageProperty fetched = getProperty( key, cursor.propertiesReference() ); if ( fetched != null ) { oldValue = fetched.value(); } } } transaction.relationshipDoReplaceProperty( relationshipId, key, oldValue, Values.of( value ) ); return property; }
private Value committedValue( RelationshipState relState, int property, StorageRelationshipScanCursor relationship, StoragePropertyCursor properties ) { if ( state.relationshipIsAddedInThisTx( relState.getId() ) ) { return Values.NO_VALUE; } relationship.single( relState.getId() ); if ( !relationship.next() ) { return Values.NO_VALUE; } return committedValue( properties, relationship.propertiesReference(), property ); }
if ( relationship.next() ) properties.init( relationship.propertiesReference() ); while ( properties.next() )