public final class StatementCustomizers extends Object
StatementCustomizers you might find handy.| Modifier and Type | Method and Description |
|---|---|
static StatementCustomizer |
fetchDirection(Integer direction)
Sets the fetch direction on a query.
|
static StatementCustomizer |
fetchSize(int fetchSize)
Set the number of rows to fetch from the database in a single batch.
|
static StatementCustomizer |
maxFieldSize(int maxFieldSize)
Sets the limit of large variable size types like
VARCHAR. |
static StatementCustomizer |
maxRows(int maxRows)
Limit number of rows returned.
|
static StatementCustomizer |
statementTimeout(int seconds)
Set a timeout on the statement.
|
public static StatementCustomizer fetchDirection(Integer direction)
direction - the direction, per Statement.setFetchDirection(int)public static StatementCustomizer fetchSize(int fetchSize)
fetchSize - number of rows to fetch at a timepublic static StatementCustomizer maxFieldSize(int maxFieldSize)
VARCHAR.
Limited data is silently discarded, so be careful!maxFieldSize - the maximum field size to returnpublic static StatementCustomizer maxRows(int maxRows)
LIMIT clause
and is not recommended unless you understand why you need it specifically.maxRows - number of rows to returnpublic static StatementCustomizer statementTimeout(int seconds)
seconds - timeout in secondsCopyright © 2017. All rights reserved.