Top Description Fields Constructors Methods
org.hibernate.dialect.pagination

public Class SQLServer2012LimitHandler

extends OffsetFetchLimitHandler
Class Inheritance
Imports
org.hibernate.dialect.pagination.SQLServer2005LimitHandler.Keyword

A LimitHandler compatible with SQL Server 2012 which introduced support for the ANSI SQL standard syntax OFFSET m ROWS FETCH NEXT n ROWS ONLY, though this syntax is considered part of the ORDER BY clause, and with the wrinkle that both ORDER BY and the OFFSET clause are required.
Authors
Chris Cranford, Gavin King

Field Summary

Modifier and TypeField and Description
public static final SQLServer2012LimitHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
begin(String sql, StringBuilder offsetFetch, boolean hasFirstRow, boolean hasMaxRows)

Overrides org.hibernate.dialect.pagination.OffsetFetchLimitHandler.begin.

OFFSET and FETCH have to come right at the end of the ORDER BY clause, and OFFSET is required in order to have a FETCH:
order by ...
Inherited from org.hibernate.dialect.pagination.OffsetFetchLimitHandler:
insertprocessSqlrenderOffsetRowsKeywordsupportsLimitsupportsOffsetsupportsVariableLimit

Field Detail

INSTANCEback to summary
public static final SQLServer2012LimitHandler INSTANCE

Hides org.hibernate.dialect.pagination.OffsetFetchLimitHandler.INSTANCE.

Constructor Detail

SQLServer2012LimitHandlerback to summary
public SQLServer2012LimitHandler()

Method Detail

beginback to summary
pack-priv void begin(String sql, StringBuilder offsetFetch, boolean hasFirstRow, boolean hasMaxRows)

Overrides org.hibernate.dialect.pagination.OffsetFetchLimitHandler.begin.

OFFSET and FETCH have to come right at the end of the ORDER BY clause, and OFFSET is required in order to have a FETCH:

order by ... offset m rows [fetch next n rows only]
Annotations
@Override