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] = {
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] {
override protected def fetchNext(): Relationship = {
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] = {
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] {
override protected def fetchNext(): Relationship = {
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 )
throws KernelException;

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

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

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

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

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

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

@Override
public Scan<RelationshipScanCursor> relationshipLabelScan( int label )
public Scan<RelationshipScanCursor> relationshipTypeScan( int type )
{
throw new UnsupportedOperationException();
}
Expand Down
Expand Up @@ -264,7 +264,7 @@ public Stream<RelationshipResult> relationshipManualIndexSeek( @Name( "indexName
try ( Statement ignore = tx.acquireStatement() )
{
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 );
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();
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 ) ) );
}
catch ( KernelException e )
Expand Down
Expand Up @@ -934,7 +934,7 @@ public ConstraintDescriptor relationshipPropertyExistenceConstraintCreate( Relat
assertConstraintDoesNotExist( constraint );

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

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

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

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

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

0 comments on commit 51314bb

Please sign in to comment.