public final class SQL extends Object
Modifier and Type | Method and Description |
---|---|
static <T> Seq<T> |
seq(PreparedStatement stmt,
java.util.function.Function<ResultSet,T> rowFunction)
Obtain a stream from a JDBC
ResultSet that is obtained from a PreparedStatement with a row
mapping function. |
static <T> Seq<T> |
seq(PreparedStatement stmt,
java.util.function.Function<ResultSet,T> rowFunction,
java.util.function.Consumer<? super SQLException> exceptionTranslator)
Obtain a stream from a JDBC
ResultSet that is obtained from a PreparedStatement with a row
mapping function. |
static <T> Seq<T> |
seq(ResultSet rs,
java.util.function.Function<ResultSet,T> rowFunction)
Obtain a stream from a JDBC
ResultSet with a row mapping function. |
static <T> Seq<T> |
seq(ResultSet rs,
java.util.function.Function<ResultSet,T> rowFunction,
java.util.function.Consumer<? super SQLException> exceptionTranslator)
Obtain a stream from a JDBC
ResultSet with a row mapping function. |
static <T> Seq<T> |
seq(java.util.function.Supplier<? extends ResultSet> supplier,
java.util.function.Function<ResultSet,T> rowFunction)
|
static <T> Seq<T> |
seq(java.util.function.Supplier<? extends ResultSet> supplier,
java.util.function.Function<ResultSet,T> rowFunction,
java.util.function.Consumer<? super SQLException> exceptionTranslator)
|
public static <T> Seq<T> seq(PreparedStatement stmt, java.util.function.Function<ResultSet,T> rowFunction)
ResultSet
that is obtained from a PreparedStatement
with a row
mapping function.
Clients are responsible themselves for closing the ResultSet
.
T
- The custom type.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.Stream
wrapping the ResultSet
public static <T> Seq<T> seq(PreparedStatement stmt, java.util.function.Function<ResultSet,T> rowFunction, java.util.function.Consumer<? super SQLException> exceptionTranslator)
ResultSet
that is obtained from a PreparedStatement
with a row
mapping function.
Clients are responsible themselves for closing the ResultSet
.
T
- The custom type.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.Stream
wrapping the ResultSet
public static <T> Seq<T> seq(ResultSet rs, java.util.function.Function<ResultSet,T> rowFunction)
ResultSet
with a row mapping function.
Clients are responsible themselves for closing the ResultSet
.
T
- The custom type.rs
- The JDBC ResultSet
to wrap in a Stream
rowFunction
- The row mapping function that maps ResultSet
rows to a custom type.Stream
wrapping the ResultSet
public static <T> Seq<T> seq(ResultSet rs, java.util.function.Function<ResultSet,T> rowFunction, java.util.function.Consumer<? super SQLException> exceptionTranslator)
ResultSet
with a row mapping function.
Clients are responsible themselves for closing the ResultSet
.
T
- The custom type.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.Stream
wrapping the ResultSet
public static <T> Seq<T> seq(java.util.function.Supplier<? extends ResultSet> supplier, java.util.function.Function<ResultSet,T> rowFunction)
ResultSet
Supplier
with a row mapping function.
Clients are responsible themselves for closing the ResultSet
.
T
- The custom type.supplier
- The JDBC ResultSet
Supplier
to wrap in a Stream
rowFunction
- The row mapping function that maps ResultSet
rows to a custom type.Stream
wrapping the ResultSet
public static <T> Seq<T> seq(java.util.function.Supplier<? extends ResultSet> supplier, java.util.function.Function<ResultSet,T> rowFunction, java.util.function.Consumer<? super SQLException> exceptionTranslator)
ResultSet
Supplier
with a row mapping function.
Clients are responsible themselves for closing the ResultSet
.
T
- The custom type.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.Stream
wrapping the ResultSet
Copyright © 2015. All Rights Reserved.