use of org.neo4j.kernel.impl.newapi.FilteringNodeCursorWrapper in project neo4j by neo4j.
the class TransactionImpl method allNodesByLabelWithoutIndex.
private ResourceIterator<Node> allNodesByLabelWithoutIndex(KernelTransaction ktx, int labelId) {
NodeCursor cursor = ktx.cursors().allocateNodeCursor(ktx.cursorContext());
ktx.dataRead().allNodesScan(cursor);
var filetredCursor = new FilteringNodeCursorWrapper(cursor, CursorPredicates.hasLabel(labelId));
return new CursorIterator<>(filetredCursor, NodeCursor::nodeReference, c -> newNodeEntity(c.nodeReference()), coreApiResourceTracker);
}
Aggregations