Class LimitOffsetLimitHandler
java.lang.Object
org.hibernate.dialect.pagination.spi.AbstractLimitHandler
org.hibernate.dialect.pagination.spi.AbstractSimpleLimitHandler
org.hibernate.dialect.pagination.spi.LimitOffsetLimitHandler
- All Implemented Interfaces:
LimitHandler
A
LimitHandler for databases like PostgreSQL, H2,
and HSQL that support the syntax LIMIT n OFFSET m.
Note that this syntax does not allow specification of an
offset without a limit.- Since:
- 8.0
-
Field Summary
FieldsFields inherited from class AbstractLimitHandler
NO_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanUsually, the offset comes before the limit, but occasionally the offset is specified after the limit.protected StringlimitClause(boolean hasFirstRow, PaginationRequest request) protected StringoffsetOnlyClause(PaginationRequest request) booleanDoes this handler support offsetting query results without also specifying a limit?Methods inherited from class AbstractSimpleLimitHandler
insert, processSql, supportsLimit, supportsVariableLimitMethods inherited from class AbstractLimitHandler
bindLimitParametersFirst, bindLimitParameterValues, convertToFirstRowValue, forceLimitUsage, getFirstRow, getForUpdatePattern, getMaxOrLimit, hasFirstRow, hasMaxRows, insertAfterDistinct, insertAfterSelect, insertAtEnd, insertBeforeForUpdate, jdbcInstructions, jdbcMaxRows, parameterPositionStart, result, rowsToSkip, supportsLimitOffset, useMaxForLimit
-
Field Details
-
INSTANCE
-
OFFSET_ONLY_INSTANCE
-
-
Constructor Details
-
LimitOffsetLimitHandler
-
-
Method Details
-
limitClause
- Specified by:
limitClausein classAbstractSimpleLimitHandler
-
offsetOnlyClause
- Overrides:
offsetOnlyClausein classAbstractSimpleLimitHandler
-
bindLimitParametersInReverseOrder
public final boolean bindLimitParametersInReverseOrder()Description copied from class:AbstractLimitHandlerUsually, the offset comes before the limit, but occasionally the offset is specified after the limit. Does this dialect require us to bind the parameters in reverse order?- Overrides:
bindLimitParametersInReverseOrderin classAbstractLimitHandler- Returns:
- true if the correct order is limit then offset
-
supportsOffset
public boolean supportsOffset()Description copied from interface:LimitHandlerDoes this handler support offsetting query results without also specifying a limit?- Specified by:
supportsOffsetin interfaceLimitHandler- Overrides:
supportsOffsetin classAbstractSimpleLimitHandler- Returns:
- True if this handler supports offset alone.
-