Skip to content

Commit

Permalink
Remove RelationshipDirection.ALL, add RelationshipDirection.ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
fickludd committed Jan 24, 2018
1 parent f10ff93 commit 6b91808
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,12 +510,6 @@ public PrimitiveLongIterator getRawRelationships( RelationshipDirection directio
return outgoing != null ? primitiveIdsByType( outgoing, type ) : emptyIterator();
case LOOP:
return loops != null ? primitiveIdsByType( loops, type ) : emptyIterator();
case ALL:
return outgoing != null || incoming != null || loops != null ?
PrimitiveLongCollections.concat(
getRawRelationships( INCOMING, type ),
getRawRelationships( OUTGOING, type ),
getRawRelationships( LOOP, type ) ) : emptyIterator();
default:
throw new IllegalArgumentException( "Unknown direction: " + direction );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
* a.getRelationships( OUTGOING ) => r1
* a.getRelationships( INCOMING ) => r2
* a.getRelationships( LOOP ) => r3
* a.getRelationships( ALL ) => r1, r2, r3
*
* Note that this contrasts with /** @see #org.neo4j.graphdb.Direction(long), where
* a.getRelationships( org.neo4j.graphdb.Direction.OUTGOING ) => r1, r3
Expand All @@ -43,5 +42,5 @@ public enum RelationshipDirection
OUTGOING,
INCOMING,
LOOP,
ALL
ERROR // NOOP value for state machines et.c.
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ public void shouldGetRawRelationshipsByTypeAndDirection() throws Exception
PrimitiveLongIterator rawLoops =
changes.getRawRelationships( RelationshipDirection.LOOP, TYPE );
assertThat( PrimitiveLongCollections.asArray( rawLoops ), ids( 4, 5, 6 ) );

PrimitiveLongIterator rawAll =
changes.getRawRelationships( RelationshipDirection.ALL, TYPE );
assertThat( PrimitiveLongCollections.asArray( rawAll ), ids( 1, 2, 3, 4, 5, 6 ) );
}

private Matcher<long[]> ids( long... ids )
Expand Down

0 comments on commit 6b91808

Please sign in to comment.