-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
505583e
commit c861647
Showing
2 changed files
with
42 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,20 +179,19 @@ protected Object convertKey(final OIndex<?> idx, Object iValue) { | |
return iValue; | ||
} | ||
|
||
public Stream<OrientVertex> getIndexedVertices(OrientIndexQuery indexReference) { | ||
// TODO: make value optional | ||
public Stream<OrientVertex> getIndexedVertices(OIndex index, Object value) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mpollmeier
Author
Collaborator
|
||
makeActive(); | ||
|
||
// if (iKey.equals("@class")) | ||
// return getVerticesOfClass(iValue.toString()); | ||
|
||
final OIndex<?> idx = database.getMetadata().getIndexManager().getIndex(indexReference.indexName()); | ||
Object iValue = indexReference.value; | ||
if (idx == null) { | ||
if (index == null) { | ||
// NO INDEX | ||
return Collections.<OrientVertex>emptyList().stream(); | ||
} else { | ||
iValue = convertKey(idx, iValue); | ||
Object indexValue = idx.get(iValue); | ||
value = convertKey(index, value); | ||
Object indexValue = index.get(value); | ||
if (indexValue == null) { | ||
return Collections.<OrientVertex>emptyList().stream(); | ||
} else if (!(indexValue instanceof Iterable<?>)) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mpollmeier do we have any test that covers this?
Is this used at all?
Coverage is zero on this
https://coveralls.io/builds/4608555/source?filename=driver%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ftinkerpop%2Fgremlin%2Forientdb%2FOrientGraph.java#L210