private ResourceIterator<Node> getNodesByLabelAndPropertyWithoutIndex( Statement statement, int labelId, IndexQuery... queries ) { KernelTransaction transaction = statementContext.getKernelTransactionBoundToThisThread( true ); NodeLabelIndexCursor nodeLabelCursor = transaction.cursors().allocateNodeLabelIndexCursor(); NodeCursor nodeCursor = transaction.cursors().allocateNodeCursor(); PropertyCursor propertyCursor = transaction.cursors().allocatePropertyCursor(); transaction.dataRead().nodeLabelScan( labelId, nodeLabelCursor ); return new NodeLabelPropertyIterator( transaction.dataRead(), nodeLabelCursor, nodeCursor, propertyCursor, statement, this::newNodeProxy, queries ); }
@Override protected long fetchNext() { boolean hasNext; do { hasNext = nodeLabelCursor.next(); } while ( hasNext && !hasPropertiesWithValues() ); if ( hasNext ) { return nodeLabelCursor.nodeReference(); } else { close(); return NO_ID; } }
@Override protected long fetchNext() { boolean hasNext; do { hasNext = nodeLabelCursor.next(); } while ( hasNext && !hasPropertiesWithValues() ); if ( hasNext ) { return nodeLabelCursor.nodeReference(); } else { close(); return NO_ID; } }
private ResourceIterator<Node> getNodesByLabelAndPropertyWithoutIndex( Statement statement, int labelId, IndexQuery... queries ) { KernelTransaction transaction = statementContext.getKernelTransactionBoundToThisThread( true ); NodeLabelIndexCursor nodeLabelCursor = transaction.cursors().allocateNodeLabelIndexCursor(); NodeCursor nodeCursor = transaction.cursors().allocateNodeCursor(); PropertyCursor propertyCursor = transaction.cursors().allocatePropertyCursor(); transaction.dataRead().nodeLabelScan( labelId, nodeLabelCursor ); return new NodeLabelPropertyIterator( transaction.dataRead(), nodeLabelCursor, nodeCursor, propertyCursor, statement, this::newNodeProxy, queries ); }