public interface Query extends ParameterProvider<Query,PreparedStatement>
| Modifier and Type | Method and Description |
|---|---|
default <R> Optional<R> |
first(SqlFunction<ResultSet,R> mapping)
Returns the first row of the current query using the provided mapping function.
|
<R> Stream<R> |
map(SqlFunction<ResultSet,R> mapping)
Maps each row returned by this query using the provided mapping function.
|
prepare, set, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, withclose, execute, getStatementdefault <R> Optional<R> first(SqlFunction<ResultSet,R> mapping)
R - the type of the returned elementmapping - the mapping function<R> Stream<R> map(SqlFunction<ResultSet,R> mapping)
This method should be called with a try-with-resources construct
to ensure that the underlying Statement and ResultSet are correctly closed.
R - the type of the elements of the returned streammapping - the mapping functionCopyright © 2019. All rights reserved.