Uses of Interface
com.google.mu.safesql.StatementSettings
Packages that use StatementSettings
Package
Description
Injection-safe SQL template (requires mug-safesql artifact)
-
Uses of StatementSettings in com.google.mu.safesql
Methods in com.google.mu.safesql with parameters of type StatementSettingsModifier and TypeMethodDescription<T> List
<T> SafeSql.query
(Connection connection, StatementSettings settings, SqlFunction<? super ResultSet, ? extends T> rowMapper) Similar toSafeSql.query(DataSource, StatementSettings, SqlFunction)
, but uses an existing connection.<T> List
<T> SafeSql.query
(Connection connection, StatementSettings settings, Class<? extends T> resultType) Similar toSafeSql.query(DataSource, StatementSettings, Class)
, but uses an existing connection.<T> List
<T> SafeSql.query
(DataSource dataSource, StatementSettings settings, SqlFunction<? super ResultSet, ? extends T> rowMapper) Executes the encapsulated SQL as a query againstdataSource.getConnection()
, usingsettings
(can be set via lambda likestmt -> stmt.setMaxRows(100)
).<T> List
<T> SafeSql.query
(DataSource dataSource, StatementSettings settings, Class<? extends T> resultType) Similar toSafeSql.query(DataSource, Class)
, but withsettings
(can be set via lambda likestmt -> stmt.setMaxRows(100)
) to allow customization.<T> Stream
<T> SafeSql.queryLazily
(Connection connection, StatementSettings settings, SqlFunction<? super ResultSet, ? extends T> rowMapper) Executes the encapsulated SQL as a query againstconnection
, withsettings
(can be set via lambda likestmt -> stmt.setFetchSize(100)
, and then fetches the results lazily in a stream.<T> Stream
<T> SafeSql.queryLazily
(Connection connection, StatementSettings settings, Class<? extends T> resultType) Executes the encapsulated SQL as a query againstconnection
, withsettings
(can be set via lambda likestmt -> stmt.setFetchSize(100)
), and then fetches the results lazily in a stream.<T> Stream
<T> SafeSql.queryLazily
(DataSource dataSource, StatementSettings settings, SqlFunction<? super ResultSet, ? extends T> rowMapper) Executes the encapsulated SQL as a query againstdataSource
, withsettings
(can be set via lambda likestmt -> stmt.setFetchSize(100)
, and then fetches the results lazily in a stream.<T> Stream
<T> SafeSql.queryLazily
(DataSource dataSource, StatementSettings settings, Class<? extends T> resultType) Executes the encapsulated SQL as a query againstconnection
, withsettings
(can be set via lambda likestmt -> stmt.setFetchSize(100)
), and then fetches the results lazily in a stream.int
SafeSql.update
(Connection connection, StatementSettings settings) Similar toSafeSql.update(Connection)
, but withsettings
(can be set via lambda likestmt -> stmt.setQueryTimeout(100)
) to allow customization.int
SafeSql.update
(DataSource dataSource, StatementSettings settings) Similar toSafeSql.update(DataSource)
, but withsettings
(can be set via lambda likestmt -> stmt.setQueryTimeout(100)
) to allow customization.