public class LegacyFirstLimitHandler extends AbstractLimitHandler
| Modifier and Type | Field and Description |
|---|---|
static LegacyFirstLimitHandler |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
String |
processSql(String sql,
RowSelection selection)
Return processed 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 |
supportsVariableLimit()
Does this handler support bind variables (i.e., prepared statement
parameters) for its limit/offset?
|
boolean |
useMaxForLimit()
Does the <tt>LIMIT</tt> clause take a "maximum" row number instead
of a total number of returned rows?
<p/>
This is easiest understood via an example.
|
bindLimitParameters, bindLimitParametersAtEndOfQuery, bindLimitParametersAtStartOfQuery, bindLimitParametersFirst, bindLimitParametersInReverseOrder, convertToFirstRowValue, forceLimitUsage, getMaxOrLimit, setMaxRowspublic static final LegacyFirstLimitHandler INSTANCE
public String processSql(String sql, RowSelection selection)
LimitHandlerReturn processed SQL query.
processSql in interface LimitHandlerprocessSql in class AbstractLimitHandlersql - the SQL query to process.selection - the selection criteria for rows.public boolean supportsLimit()
LimitHandlerDoes this handler support some form of limiting query results via a SQL clause?
supportsLimit in interface LimitHandlersupportsLimit in class AbstractLimitHandlerpublic boolean useMaxForLimit()
AbstractLimitHandlerDoes the <tt>LIMIT</tt> clause take a "maximum" row number instead of a total number of returned rows? <p/> This is easiest understood via an example. Consider you have a table with 20 rows, but you only want to retrieve rows number 11 through 20. Generally, a limit with offset would say that the offset = 11 and the limit = 10 (we only want 10 rows at a time); this is specifying the total number of returned rows. Some dialects require that we instead specify offset = 11 and limit = 20, where 20 is the "last" row we want relative to offset (i.e. total number of rows = 20 - 11 = 9) <p/> So essentially, is limit relative from offset? Or is limit absolute?
useMaxForLimit in class AbstractLimitHandlerpublic boolean supportsLimitOffset()
LimitHandlerDoes this handler’s LIMIT support (if any) additionally support specifying an offset?
supportsLimitOffset in interface LimitHandlersupportsLimitOffset in class AbstractLimitHandlerpublic boolean supportsVariableLimit()
AbstractLimitHandlerDoes this handler support bind variables (i.e., prepared statement parameters) for its limit/offset?
supportsVariableLimit in class AbstractLimitHandlerCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.