Exemplo n.º 1
0
 public PrimitiveLongResourceIterator nodeGetUniqueFromIndexLookup(
     KernelStatement state, long indexId, Object value) throws IndexNotFoundKernelException {
   /* Here we have an intricate scenario where we need to return the PrimitiveLongIterator
    * since subsequent filtering will happen outside, but at the same time have the ability to
    * close the IndexReader when done iterating over the lookup result. This is because we get
    * a fresh reader that isn't associated with the current transaction and hence will not be
    * automatically closed. */
   IndexReader reader = state.getFreshIndexReader(indexId);
   return resourceIterator(reader.lookup(value), reader);
 }
Exemplo n.º 2
0
 public PrimitiveLongIterator nodesGetFromIndexLookup(
     KernelStatement state, long index, Object value) throws IndexNotFoundKernelException {
   return state.getIndexReader(index).lookup(value);
 }
Exemplo n.º 3
0
 @Override
 public PrimitiveLongIterator nodesGetForLabel(KernelStatement state, int labelId) {
   return state.getLabelScanReader().nodesWithLabel(labelId);
 }