Uses of Interface
com.google.mu.safesql.SqlFunction
Packages that use SqlFunction
-
Uses of SqlFunction in com.google.mu.safesql
Methods in com.google.mu.safesql with parameters of type SqlFunctionModifier and TypeMethodDescriptionstatic <T> StringFormat.Template
<List<T>> SafeSql.prepareToQuery
(Connection connection, String template, SqlFunction<? super ResultSet, ? extends T> rowMapper) Returns a query template that will reuse the same cachedPreparedStatement
for repeated calls ofStringFormat.Template.with(java.lang.Object...)
using different parameters.<T> List
<T> SafeSql.query
(Connection connection, SqlFunction<? super ResultSet, ? extends T> rowMapper) Executes the encapsulated SQL as a query againstconnection
.<T> Stream
<T> SafeSql.queryLazily
(Connection connection, int fetchSize, SqlFunction<? super ResultSet, ? extends T> rowMapper) Executes the encapsulated SQL as a query againstconnection
, setsfetchSize
usingStatement.setFetchSize(int)
, and then fetches the results lazily in a stream.<T> Stream
<T> SafeSql.queryLazily
(Connection connection, SqlFunction<? super ResultSet, ? extends T> rowMapper) Executes the encapsulated SQL as a query againstconnection
, and then fetches the results lazily in a stream.