Skip to content

Commit

Permalink
Consistent naming
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusmelke committed Mar 21, 2018
1 parent 3b9e43d commit 51314bb
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
Expand Up @@ -634,7 +634,7 @@ final class TransactionBoundQueryContext(tc: TransactionalContextWrapper, val re


def indexGet(name: String, key: String, value: Any): Iterator[Relationship] = { def indexGet(name: String, key: String, value: Any): Iterator[Relationship] = {
val cursor = allocateAndTraceRelationshipExplicitIndexCursor() val cursor = allocateAndTraceRelationshipExplicitIndexCursor()
tc.kernelTransaction.indexRead().relationshipExplicitIndexGet(cursor, name, key, Values.of(value), -1, -1) tc.kernelTransaction.indexRead().relationshipExplicitIndexLookup(cursor, name, key, Values.of(value), -1, -1)
new CursorIterator[Relationship] { new CursorIterator[Relationship] {
override protected def fetchNext(): Relationship = { override protected def fetchNext(): Relationship = {
while (cursor.next() ) { while (cursor.next() ) {
Expand Down
Expand Up @@ -655,7 +655,7 @@ final class TransactionBoundQueryContext(txContext: TransactionalContextWrapper,


def indexGet(name: String, key: String, value: Any): Iterator[Relationship] = { def indexGet(name: String, key: String, value: Any): Iterator[Relationship] = {
val cursor = allocateAndTraceRelationshipExplicitIndexCursor() val cursor = allocateAndTraceRelationshipExplicitIndexCursor()
txContext.kernelTransaction.indexRead().relationshipExplicitIndexGet(cursor, name, key, Values.of(value), -1, -1) txContext.kernelTransaction.indexRead().relationshipExplicitIndexLookup(cursor, name, key, Values.of(value), -1, -1)
new CursorIterator[Relationship] { new CursorIterator[Relationship] {
override protected def fetchNext(): Relationship = { override protected def fetchNext(): Relationship = {
while (cursor.next() ) { while (cursor.next() ) {
Expand Down
Expand Up @@ -36,7 +36,7 @@ void nodeExplicitIndexQuery( NodeExplicitIndexCursor cursor, String index, Objec
void nodeExplicitIndexQuery( NodeExplicitIndexCursor cursor, String index, String key, Object query ) void nodeExplicitIndexQuery( NodeExplicitIndexCursor cursor, String index, String key, Object query )
throws KernelException; throws KernelException;


void relationshipExplicitIndexGet( void relationshipExplicitIndexLookup(
RelationshipExplicitIndexCursor cursor, String index, String key, Value value, long source, long target ) RelationshipExplicitIndexCursor cursor, String index, String key, Value value, long source, long target )
throws KernelException; throws KernelException;


Expand Down
Expand Up @@ -236,9 +236,9 @@ long nodeUniqueIndexSeek( IndexReference index, IndexQuery.ExactPredicate... pre


Scan<RelationshipScanCursor> allRelationshipsScan(); Scan<RelationshipScanCursor> allRelationshipsScan();


void relationshipLabelScan( int label, RelationshipScanCursor cursor ); void relationshipTypeScan( int type, RelationshipScanCursor cursor );


Scan<RelationshipScanCursor> relationshipLabelScan( int label ); Scan<RelationshipScanCursor> relationshipTypeScan( int type );


/** /**
* @param nodeReference * @param nodeReference
Expand Down
Expand Up @@ -111,7 +111,7 @@ public void shouldFindRelationshipByLookup() throws Exception
PrimitiveLongSet edges = Primitive.longSet() ) PrimitiveLongSet edges = Primitive.longSet() )
{ {
// when // when
indexRead.relationshipExplicitIndexGet( indexRead.relationshipExplicitIndexLookup(
cursor, cursor,
"rels", "rels",
"alpha", "alpha",
Expand All @@ -123,7 +123,7 @@ public void shouldFindRelationshipByLookup() throws Exception
assertFoundRelationships( cursor, 1, edges ); assertFoundRelationships( cursor, 1, edges );


// when // when
indexRead.relationshipExplicitIndexGet( cursor, "rels", "bar", stringValue( "not that" ), -1, -1 ); indexRead.relationshipExplicitIndexLookup( cursor, "rels", "bar", stringValue( "not that" ), -1, -1 );


// then // then
assertFoundRelationships( cursor, 0, edges ); assertFoundRelationships( cursor, 0, edges );
Expand Down
Expand Up @@ -152,13 +152,13 @@ public Scan<RelationshipScanCursor> allRelationshipsScan()
} }


@Override @Override
public void relationshipLabelScan( int label, RelationshipScanCursor cursor ) public void relationshipTypeScan( int type, RelationshipScanCursor cursor )
{ {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }


@Override @Override
public Scan<RelationshipScanCursor> relationshipLabelScan( int label ) public Scan<RelationshipScanCursor> relationshipTypeScan( int type )
{ {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
Expand Down
Expand Up @@ -264,7 +264,7 @@ public Stream<RelationshipResult> relationshipManualIndexSeek( @Name( "indexName
try ( Statement ignore = tx.acquireStatement() ) try ( Statement ignore = tx.acquireStatement() )
{ {
RelationshipExplicitIndexCursor cursor = tx.cursors().allocateRelationshipExplicitIndexCursor(); RelationshipExplicitIndexCursor cursor = tx.cursors().allocateRelationshipExplicitIndexCursor();
tx.indexRead().relationshipExplicitIndexGet( cursor, manualIndexName, key, Values.of( value ), tx.indexRead().relationshipExplicitIndexLookup( cursor, manualIndexName, key, Values.of( value ),
-1, -1 ); -1, -1 );
return toStream( cursor, id -> new RelationshipResult( graphDatabaseAPI.getRelationshipById( id ) ) ); return toStream( cursor, id -> new RelationshipResult( graphDatabaseAPI.getRelationshipById( id ) ) );
} }
Expand Down Expand Up @@ -406,7 +406,7 @@ public Stream<RelationshipResult> relationshipAutoIndexSeek( @Name( "key" ) Stri
{ {
RelationshipExplicitIndexCursor cursor = tx.cursors().allocateRelationshipExplicitIndexCursor(); RelationshipExplicitIndexCursor cursor = tx.cursors().allocateRelationshipExplicitIndexCursor();
tx.indexRead() tx.indexRead()
.relationshipExplicitIndexGet( cursor, "relationship_auto_index", key, Values.of( value ), -1, -1 ); .relationshipExplicitIndexLookup( cursor, "relationship_auto_index", key, Values.of( value ), -1, -1 );
return toStream( cursor, id -> new RelationshipResult( graphDatabaseAPI.getRelationshipById( id ) ) ); return toStream( cursor, id -> new RelationshipResult( graphDatabaseAPI.getRelationshipById( id ) ) );
} }
catch ( KernelException e ) catch ( KernelException e )
Expand Down
Expand Up @@ -934,7 +934,7 @@ public ConstraintDescriptor relationshipPropertyExistenceConstraintCreate( Relat
assertConstraintDoesNotExist( constraint ); assertConstraintDoesNotExist( constraint );


//enforce constraints //enforce constraints
allStoreHolder.relationshipLabelScan( descriptor.getRelTypeId(), relationshipCursor ); allStoreHolder.relationshipTypeScan( descriptor.getRelTypeId(), relationshipCursor );
constraintSemantics constraintSemantics
.validateRelationshipPropertyExistenceConstraint( relationshipCursor, propertyCursor, descriptor ); .validateRelationshipPropertyExistenceConstraint( relationshipCursor, propertyCursor, descriptor );


Expand Down
Expand Up @@ -301,14 +301,14 @@ public final Scan<RelationshipScanCursor> allRelationshipsScan()
} }


@Override @Override
public final void relationshipLabelScan( int label, RelationshipScanCursor cursor ) public final void relationshipTypeScan( int type, RelationshipScanCursor cursor )
{ {
ktx.assertOpen(); ktx.assertOpen();
((DefaultRelationshipScanCursor) cursor).scan( label, this ); ((DefaultRelationshipScanCursor) cursor).scan( type, this );
} }


@Override @Override
public final Scan<RelationshipScanCursor> relationshipLabelScan( int label ) public final Scan<RelationshipScanCursor> relationshipTypeScan( int type )
{ {
ktx.assertOpen(); ktx.assertOpen();
throw new UnsupportedOperationException( "not implemented" ); throw new UnsupportedOperationException( "not implemented" );
Expand Down Expand Up @@ -463,7 +463,7 @@ public final void nodeExplicitIndexQuery(
} }


@Override @Override
public void relationshipExplicitIndexGet( public void relationshipExplicitIndexLookup(
RelationshipExplicitIndexCursor cursor, RelationshipExplicitIndexCursor cursor,
String index, String index,
String key, String key,
Expand Down

0 comments on commit 51314bb

Please sign in to comment.