Interface ParameterizedRowOperation<T>

    • Method Detail

      • onError

        ParameterizedRowOperation<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>
        Specified by:
        onError in interface RowOperation<T>
        Returns:
        this ParameterizedRowOperation
      • fetchSize

        ParameterizedRowOperation<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.
        Specified by:
        fetchSize in interface RowOperation<T>
        Parameters:
        rows - suggested number of rows to fetch per access
        Returns:
        this ParameterizedRowOperation
        Throws:
        java.lang.IllegalArgumentException - if row < 1
      • collect

        <A,​S extends TParameterizedRowOperation<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.
        Specified by:
        collect in interface RowOperation<T>
        Type Parameters:
        A - the type of the accumulator
        S - the type of the final result
        Parameters:
        c - the Collector. Not null.
        Returns:
        this ParameterizedRowOperation
      • set

        ParameterizedRowOperation<T> set​(java.lang.String id,
                                         java.lang.Object value,
                                         SqlType type)
        Set a parameter value. The value is captured and should not be modified before the Operation is completed.
        Specified by:
        set in interface ParameterizedOperation<T>
        Parameters:
        id - the identifier of the parameter marker to be set
        value - the value the parameter is to be set to
        type - the SQL type of the value to send to the database
        Returns:
        this ParameterizedRowOperation
      • set

        ParameterizedRowOperation<T> set​(java.lang.String id,
                                         java.util.concurrent.CompletionStage<?> source,
                                         SqlType type)
        Set a parameter value to be the value of a CompletionStage. The Operation will not be executed until the CompletionStage is completed. This method allows submitting Operations that depend on the result of previous Operations rather than requiring that the dependent Operation be submitted only when the previous Operation completes.
        Specified by:
        set in interface ParameterizedOperation<T>
        Parameters:
        id - the identifier of the parameter marker to be set
        source - the CompletionStage that provides the value the parameter is to be set to
        type - the SQL type of the value to send to the database
        Returns:
        this ParameterizedRowOperation
      • set

        ParameterizedRowOperation<T> set​(java.lang.String id,
                                         java.util.concurrent.CompletionStage<?> source)
        Set a parameter value to be the future value of a CompletionStage. The Operation will not be executed until the CompletionStage is completed. This method allows submitting Operations that depend on the result of previous Operations rather than requiring that the dependent Operation be submitted only when the previous Operation completes. Use a default SQL type determined by the type of the value of the CompletionStage argument.
        Specified by:
        set in interface ParameterizedOperation<T>
        Parameters:
        id - the identifier of the parameter marker to be set
        source - the CompletionStage that provides the value the parameter is to be set to
        Returns:
        this ParameterizedRowOperation
      • set

        ParameterizedRowOperation<T> set​(java.lang.String id,
                                         java.lang.Object value)
        Set a parameter value. Use a default SQL type determined by the type of the value argument. The value is captured and should not be modified before the Operation is completed.
        Specified by:
        set in interface ParameterizedOperation<T>
        Parameters:
        id - the identifier of the parameter marker to be set
        value - the value the parameter is to be set to
        Returns:
        this ParameterizedRowOperation
      • timeout

        ParameterizedRowOperation<T> timeout​(java.time.Duration minTime)
        The minimum time before this Operation might be canceled automatically. The default value is forever. The time is counted from the beginning of Operation execution. The Operation will not be canceled before minTime after the beginning of execution. Some time at least minTime after the beginning of execution, an attempt will be made to cancel the Operation if it has not yet completed. Implementations are encouraged to attempt to cancel within a reasonable time, though what is reasonable is implementation dependent.
        Specified by:
        timeout in interface Operation<T>
        Parameters:
        minTime - minimum time to wait before attempting to cancel
        Returns:
        this ParameterizedRowOperation