public interface DbmsLimitHandler
| Modifier and Type | Method and Description |
|---|---|
String |
applySql(String sql,
boolean isSubquery,
Integer limit,
Integer offset)
Apply the LIMIT and OFFSET clause on the given SQL as parameters.
|
void |
applySql(StringBuilder sqlSb,
boolean isSubquery,
String limit,
String offset)
Apply the LIMIT and OFFSET clause on the given SQL.
|
String |
applySqlInlined(String sql,
boolean isSubquery,
Integer limit,
Integer offset)
Like
applySql(String, boolean, Integer, Integer) but inlines the parameter values. |
int |
bindLimitParametersAtEndOfQuery(Integer limit,
Integer offset,
PreparedStatement statement,
int index)
Bind parameter values needed by the LIMIT clause after original SELECT statement.
|
int |
bindLimitParametersAtStartOfQuery(Integer limit,
Integer offset,
PreparedStatement statement,
int index)
Bind parameter values needed by the LIMIT clause before original SELECT statement.
|
boolean |
limitIncludesOffset()
Returns whether the parameter value for OFFSET should be added to the value of LIMIT.
|
void |
setMaxRows(Integer limit,
Integer offset,
PreparedStatement statement)
Use JDBC API to limit the number of rows returned by the SQL query.
|
boolean |
supportsLimit()
Returns whether the dbms supports LIMIT via SQL.
|
boolean |
supportsLimitOffset()
Returns whether the dbms supports OFFSET via SQL.
|
boolean supportsLimit()
boolean supportsLimitOffset()
boolean limitIncludesOffset()
String applySql(String sql, boolean isSubquery, Integer limit, Integer offset)
sql - the sql query on which to applyisSubquery - whether the query is a subquerylimit - the limit or nulloffset - the offset or nullString applySqlInlined(String sql, boolean isSubquery, Integer limit, Integer offset)
applySql(String, boolean, Integer, Integer) but inlines the parameter values.sql - the sql query on which to applyisSubquery - whether the query is a subquerylimit - the limit or nulloffset - the offset or nullvoid applySql(StringBuilder sqlSb, boolean isSubquery, String limit, String offset)
sqlSb - the string builder containing the sql query on which to applyisSubquery - whether the query is a subquerylimit - the limit value or nulloffset - the offset value or nullint bindLimitParametersAtStartOfQuery(Integer limit, Integer offset, PreparedStatement statement, int index) throws SQLException
limit - the limit or nulloffset - the offset or nullstatement - the statement to which to apply parametersindex - the index on which to bind parametersSQLException - Indicates problems binding parameter valuesint bindLimitParametersAtEndOfQuery(Integer limit, Integer offset, PreparedStatement statement, int index) throws SQLException
limit - the limit or nulloffset - the offset or nullstatement - the statement to which to apply parametersindex - the index on which to bind parametersSQLException - Indicates problems binding parameter valuesvoid setMaxRows(Integer limit, Integer offset, PreparedStatement statement) throws SQLException
limit - the limit or nulloffset - the offset or nullstatement - the statement on which to apply max rowsSQLException - Indicates problems while limiting maximum rows returnedCopyright © 2014–2018 Blazebit. All rights reserved.