Interface RowOperation<T>

    • Method Detail

      • fetchSize

        RowOperation<T> fetchSize​(long rows)
                           throws java.lang.IllegalArgumentException
        A hint to the implementation of how many rows to fetch in each database access. Implementations are free to ignore it.
        Parameters:
        rows - suggested number of rows to fetch per access
        Returns:
        this RowOperation
        Throws:
        java.lang.IllegalArgumentException - if row < 1
        java.lang.IllegalStateException - if this method had been called previously or this Operation has been submitted.
      • collect

        <A,​S extends TRowOperation<T> collect​(java.util.stream.Collector<? super Result.RowColumn,​A,​S> c)
        Provides a Collector to reduce the sequence of rows.The result of the Operation is the result of calling finisher on the final accumulated result. If the Collector is Collector.Characteristics.UNORDERED rows may be accumulated out of order. If the Collector is Collector.Characteristics.CONCURRENT then the sequence of rows may be split into subsequences that are reduced separately and then combined.
        Type Parameters:
        A - the type of the accumulator
        S - the type of the final result
        Parameters:
        c - the Collector. Not null.
        Returns:
        This RowOperation
        Throws:
        java.lang.IllegalStateException - if this method had been called previously or this Operation has been submitted.
      • collect

        default <S extends TRowOperation<T> collect​(java.util.function.Supplier<S> supplier,
                                                      java.util.function.BiConsumer<S,​Result.RowColumn> accumulator)
        Convenience method to collect the rows when the accumulated result is the final result.
        Type Parameters:
        S - the type of the accumulated result
        Parameters:
        supplier - supplies the accumulated result
        accumulator - accumulates each Result.RowColumn into the accumulated result
        Returns:
        this RowOperation
      • onError

        RowOperation<T> onError​(java.util.function.Consumer<java.lang.Throwable> handler)
        Provides an error handler for this Operation. If execution of this Operation results in an error, before the Operation is completed, the handler is called with the Throwable as the argument. The type of the Throwable is implementation dependent.
        Specified by:
        onError in interface Operation<T>
        Returns:
        this RowOperation