Class TopLimitHandler
java.lang.Object
org.hibernate.dialect.pagination.spi.AbstractLimitHandler
org.hibernate.dialect.pagination.spi.AbstractNoOffsetLimitHandler
org.hibernate.dialect.pagination.spi.TopLimitHandler
- All Implemented Interfaces:
LimitHandler
A
LimitHandler for Transact SQL and similar
databases which support the syntax SELECT TOP n.
Note that this syntax does not allow specification of
an offset.- Since:
- 8.0
-
Field Summary
FieldsFields inherited from class AbstractLimitHandler
NO_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDoes the offset/limit clause come at the start of theSELECTstatement, or at the end of the query?protected Stringprotected StringlimitClause(PaginationRequest request) intparameterPositionStart(PaginationRequest request) Determine the one-based position of the first original query parameter after any pagination parameters inserted at the beginning of the SQL.Methods inherited from class AbstractNoOffsetLimitHandler
processSql, supportsLimit, supportsLimitOffset, supportsVariableLimitMethods inherited from class AbstractLimitHandler
bindLimitParametersInReverseOrder, bindLimitParameterValues, convertToFirstRowValue, forceLimitUsage, getFirstRow, getForUpdatePattern, getMaxOrLimit, hasFirstRow, hasMaxRows, insertAfterDistinct, insertAfterSelect, insertAtEnd, insertBeforeForUpdate, jdbcInstructions, jdbcMaxRows, result, rowsToSkip, supportsOffset, useMaxForLimit
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
TopLimitHandler
-
-
Method Details
-
limitClause
- Specified by:
limitClausein classAbstractNoOffsetLimitHandler
-
insert
- Specified by:
insertin classAbstractNoOffsetLimitHandler
-
bindLimitParametersFirst
public boolean bindLimitParametersFirst()Description copied from class:AbstractLimitHandlerDoes the offset/limit clause come at the start of theSELECTstatement, or at the end of the query?- Specified by:
bindLimitParametersFirstin classAbstractNoOffsetLimitHandler- Returns:
- true if limit parameters come before other parameters
-
parameterPositionStart
Description copied from interface:LimitHandlerDetermine the one-based position of the first original query parameter after any pagination parameters inserted at the beginning of the SQL.
This method must agree with
PaginationJdbcInstructions.parametersAtStartreturned byLimitHandler.processSql(PaginationRequest)and must not mutate this handler.- Specified by:
parameterPositionStartin interfaceLimitHandler- Overrides:
parameterPositionStartin classAbstractLimitHandler
-