| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | bindLimitParametersFirst()
Overrides org. |
| public boolean | bindLimitParametersInReverseOrder()
Overrides org. |
| public int | convertToFirstRowValue(int
The user-supplied, zero-based first row offset. zeroBasedFirstResult)Overrides org. |
| public boolean | forceLimitUsage()
Overrides org. |
| public String | processSql(String
the SQL query to process. sql, RowSelection the selection criteria for rows. selection)Overrides org. Implements org. |
| public boolean | supportsLimit()
Overrides org. Implements org. |
| public boolean | supportsLimitOffset()
Overrides org. Implements org. |
| public boolean | supportsVariableLimit()
Overrides org. |
| public boolean | useMaxForLimit()
Overrides org. |
| dialect | back to summary |
|---|---|
| private final Dialect dialect | |
| LegacyLimitHandler | back to summary |
|---|---|
| public LegacyLimitHandler(Dialect dialect) Constructs a LegacyLimitHandler
| |
| bindLimitParametersFirst | back to summary |
|---|---|
| public boolean bindLimitParametersFirst() Overrides org. Doc from org. Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
| |
| bindLimitParametersInReverseOrder | back to summary |
|---|---|
| public boolean bindLimitParametersInReverseOrder() Overrides org. Doc from org. ANSI SQL defines the LIMIT clause to be in the form LIMIT offset, limit. Does this dialect require us to bind the parameters in reverse order?
| |
| convertToFirstRowValue | back to summary |
|---|---|
| public int convertToFirstRowValue(int zeroBasedFirstResult) Overrides org. Doc from org. Hibernate APIs explicitly state that setFirstResult() should be a zero-based offset. Here we allow the Dialect a chance to convert that value based on what the underlying db or driver will expect. Note what gets passed into
| |
| forceLimitUsage | back to summary |
|---|---|
| public boolean forceLimitUsage() Overrides org. Doc from org. Generally, if there is no limit applied to a Hibernate query we do not apply any limits to the SQL query. This option forces that the limit be written to the SQL query.
| |
| processSql | back to summary |
|---|---|
| public String processSql(String sql, RowSelection selection) Overrides org. Implements org. Doc from org. Return processed SQL query.
| |
| supportsLimit | back to summary |
|---|---|
| public boolean supportsLimit() Overrides org. Implements org. Doc from org. Does this handler support some form of limiting query results via a SQL clause?
| |
| supportsLimitOffset | back to summary |
|---|---|
| public boolean supportsLimitOffset() Overrides org. Implements org. Doc from org. Does this handler's LIMIT support (if any) additionally support specifying an offset?
| |
| supportsVariableLimit | back to summary |
|---|---|
| public boolean supportsVariableLimit() Overrides org. Doc from org. Does this handler support bind variables (i.e., prepared statement parameters) for its limit/offset?
| |
| useMaxForLimit | back to summary |
|---|---|
| public boolean useMaxForLimit() Overrides org. Doc from org. Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows? 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) So essentially, is limit relative from offset? Or is limit absolute?
| |