private boolean nextFromStore() {
    // Get the next row from store, unless that row should not show up from the store
    if (!txState.nodeIsAddedInThisTx(nodeId.read())) {
      while (storeCursor.next()) {
        if (!txState.relationshipIsDeletedInThisTx(relIdFromStore.read())) {
          relId.write(relIdFromStore.read());
          return true;
        }
      }
    }

    // The store cursor is exhausted. Move to the next input.
    if (inputCursor.next()) {
      // This will allow the next store cursor call to pick up another input row
      storeInputCursor.makeNextAvailable();
      storeCursor.reset();

      // If the next input row has local tx changes, swap to injecting those
      txLocalRels =
          txState.addedRelationships(nodeId.read(), relTypes.read(), expandDirection.read());
      if (txLocalRels != null) {
        state = State.INJECTING_LOCAL_RELS;
      }

      return next();
    } else {
      return false;
    }
  }
 @Override
 public void close() {
   // Store cursor will delegate to our storeInputCursor, so we need to manually delegate the close
   // call to the
   // real input cursor
   storeCursor.close();
   inputCursor.close();
 }