public interface LimitHandler
AbstractLimitHandler
class.Modifier and Type | Method and Description |
---|---|
int |
bindLimitParametersAtEndOfQuery(RowSelection selection,
PreparedStatement statement,
int index)
Bind parameter values needed by the LIMIT clause after original SELECT statement.
|
int |
bindLimitParametersAtStartOfQuery(RowSelection selection,
PreparedStatement statement,
int index)
Bind parameter values needed by the LIMIT clause before original SELECT statement.
|
String |
processSql(String sql,
RowSelection selection)
Return processed SQL query.
|
void |
setMaxRows(RowSelection selection,
PreparedStatement statement)
Use JDBC API to limit the number of rows returned by the SQL query.
|
boolean |
supportsLimit()
Does this handler support some form of limiting query results
via a SQL clause?
|
boolean |
supportsLimitOffset()
Does this handler's LIMIT support (if any) additionally
support specifying an offset?
|
boolean supportsLimit()
boolean supportsLimitOffset()
String processSql(String sql, RowSelection selection)
sql
- the SQL query to process.selection
- the selection criteria for rows.int bindLimitParametersAtStartOfQuery(RowSelection selection, PreparedStatement statement, int index) throws SQLException
selection
- the selection criteria for rows.statement
- Statement to which to bind limit parameter values.index
- Index from which to start binding.SQLException
- Indicates problems binding parameter values.int bindLimitParametersAtEndOfQuery(RowSelection selection, PreparedStatement statement, int index) throws SQLException
selection
- the selection criteria for rows.statement
- Statement to which to bind limit parameter values.index
- Index from which to start binding.SQLException
- Indicates problems binding parameter values.void setMaxRows(RowSelection selection, PreparedStatement statement) throws SQLException
selection
- the selection criteria for rows.statement
- Statement which number of returned rows shall be limited.SQLException
- Indicates problems while limiting maximum rows returned.Copyright © 2019 JBoss by Red Hat. All rights reserved.