@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }
@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }
/** * Create a copy of a batch that always has a {@link Batch#rowCount()}. * * @param batch the original batch; may be null * @return the batch that has a true {@link Batch#rowCount()}, or the original batch if null or empty or if the original has a * non-negative row count */ public static Batch copy( Batch batch ) { if (batch == null) return batch; if (batch.isEmpty() || batch.width() < 1) return emptyBatch(batch.getWorkspaceName(), 1); // Otherwise, create a copy ... return batch.width() == 1 ? new SingleWidthBatch(batch) : new MultiWidthBatch(batch); }
@Override public Node nextNode() { CachedNode cachedNode = moveToNextRow().getNode(defaultSelectorIndex); return context.getNode(cachedNode); }
@Override public Batch nextBatch() { Batch next = sequence.nextBatch(); return batchFilteredWith(next, filter); }
@Override public Object getValueInRow( RowAccessor row ) { return Tuples.tuple(first.getValueInRow(row), second.getValueInRow(row), third.getValueInRow(row), fourth.getValueInRow(row)); } };
/** * Perform a full outer join between the already defined source with the supplied table. The supplied string is of the form " * <code>tableName [AS alias]</code>". * * @param tableName the name of the table, optionally including the alias * @return the component that must be used to complete the join specification; never null */ public JoinClause fullOuterJoin( String tableName ) { // Expect there to be a source already ... return new JoinClause(namedSelector(tableName), JoinType.FULL_OUTER); }
@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }
@Override public RowIterator getRows() { return new SingleSelectorQueryResultRowIterator(context, queryStatement, sequence(), results.getColumns()); } }
@Override public Node nextNode() { CachedNode cachedNode = moveToNextRow().getNode(defaultSelectorIndex); return context.getNode(cachedNode); }
@Override public Batch nextBatch() { Batch next = sequence.nextBatch(); return batchFilteredWith(next, filter); }
/** * Perform an inner join between the already defined source with the "__ALL_NODES" table using the supplied alias. * * @param alias the alias for the "__ALL_NODES" table; may not be null * @return the component that must be used to complete the join specification; never null */ public JoinClause innerJoinAllNodesAs( String alias ) { // Expect there to be a source already ... return new JoinClause(namedSelector(AllNodes.ALL_NODES_NAME + " AS " + alias), JoinType.INNER); }
/** * Perform a right outer join between the already defined source with the "__ALL_NODES" table using the supplied alias. * * @param alias the alias for the "__ALL_NODES" table; may not be null * @return the component that must be used to complete the join specification; never null */ public JoinClause rightOuterJoinAllNodesAs( String alias ) { // Expect there to be a source already ... return new JoinClause(namedSelector(AllNodes.ALL_NODES_NAME + " AS " + alias), JoinType.RIGHT_OUTER); }