Class SQL


  • Deprecated. 
    - See https://github.com/jOOQ/jOOL/issues/169

    public final class SQL
    extends Object
    Simplifications for the JDBC APIs when used with Java 8.
    • Method Detail

      • seq

        public static <T> Seq<T> seq(PreparedStatement stmt,
                                     Function<ResultSet,T> rowFunction)
        Deprecated. 
        Obtain a stream from a JDBC ResultSet that is obtained from a PreparedStatement with a row mapping function.

        Clients are responsible themselves for closing the ResultSet.

        Type Parameters:
        T - The custom type.
        Parameters:
        stmt - The JDBC PreparedStatement that generates a ResultSet to be wrapped in a Stream
        rowFunction - The row mapping function that maps ResultSet rows to a custom type.
        Returns:
        A Stream wrapping the ResultSet
      • seq

        public static <T> Seq<T> seq(PreparedStatement stmt,
                                     Function<ResultSet,T> rowFunction,
                                     Consumer<? super SQLException> exceptionTranslator)
        Deprecated. 
        Obtain a stream from a JDBC ResultSet that is obtained from a PreparedStatement with a row mapping function.

        Clients are responsible themselves for closing the ResultSet.

        Type Parameters:
        T - The custom type.
        Parameters:
        stmt - The JDBC PreparedStatement that generates a ResultSet to be wrapped in a Stream
        rowFunction - The row mapping function that maps ResultSet rows to a custom type.
        exceptionTranslator - A custom exception translator.
        Returns:
        A Stream wrapping the ResultSet
      • seq

        public static <T> Seq<T> seq(ResultSet rs,
                                     Function<ResultSet,T> rowFunction)
        Deprecated. 
        Obtain a stream from a JDBC ResultSet with a row mapping function.

        Clients are responsible themselves for closing the ResultSet.

        Type Parameters:
        T - The custom type.
        Parameters:
        rs - The JDBC ResultSet to wrap in a Stream
        rowFunction - The row mapping function that maps ResultSet rows to a custom type.
        Returns:
        A Stream wrapping the ResultSet
      • seq

        public static <T> Seq<T> seq(ResultSet rs,
                                     Function<ResultSet,T> rowFunction,
                                     Consumer<? super SQLException> exceptionTranslator)
        Deprecated. 
        Obtain a stream from a JDBC ResultSet with a row mapping function.

        Clients are responsible themselves for closing the ResultSet.

        Type Parameters:
        T - The custom type.
        Parameters:
        rs - The JDBC ResultSet to wrap in a Stream
        rowFunction - The row mapping function that maps ResultSet rows to a custom type.
        exceptionTranslator - A custom exception translator.
        Returns:
        A Stream wrapping the ResultSet
      • seq

        public static <T> Seq<T> seq(Supplier<? extends ResultSet> supplier,
                                     Function<ResultSet,T> rowFunction)
        Deprecated. 
        Obtain a stream from a JDBC ResultSet Supplier with a row mapping function.

        Clients are responsible themselves for closing the ResultSet.

        Type Parameters:
        T - The custom type.
        Parameters:
        supplier - The JDBC ResultSet Supplier to wrap in a Stream
        rowFunction - The row mapping function that maps ResultSet rows to a custom type.
        Returns:
        A Stream wrapping the ResultSet
      • seq

        public static <T> Seq<T> seq(Supplier<? extends ResultSet> supplier,
                                     Function<ResultSet,T> rowFunction,
                                     Consumer<? super SQLException> exceptionTranslator)
        Deprecated. 
        Obtain a stream from a JDBC ResultSet Supplier with a row mapping function.

        Clients are responsible themselves for closing the ResultSet.

        Type Parameters:
        T - The custom type.
        Parameters:
        supplier - The JDBC ResultSet Supplier to wrap in a Stream
        rowFunction - The row mapping function that maps ResultSet rows to a custom type.
        exceptionTranslator - A custom exception translator.
        Returns:
        A Stream wrapping the ResultSet