java.lang.Object
org.miaixz.bus.pager.dialect.AbstractDialect
org.miaixz.bus.pager.dialect.AbstractRowBounds
org.miaixz.bus.pager.dialect.rowbounds.SqlServerRowBounds
org.miaixz.bus.pager.dialect.rowbounds.SqlServer2012RowBounds
- All Implemented Interfaces:
Dialect
SQL Server 2012 dialect for pagination based on
RowBounds. This class provides SQL Server 2012-specific SQL
generation for pagination using `OFFSET ... ROWS FETCH NEXT ... ROWS ONLY` syntax.- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields inherited from class org.miaixz.bus.pager.dialect.rowbounds.SqlServerRowBounds
replaceSql, sqlServerSqlParserFields inherited from class org.miaixz.bus.pager.dialect.AbstractDialect
countSqlParser, orderBySqlParser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPageSql(String sql, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.cache.CacheKey pageKey) Generates the SQL Server 2012-specific pagination SQL usingRowBounds.Methods inherited from class org.miaixz.bus.pager.dialect.rowbounds.SqlServerRowBounds
getCountSql, setPropertiesMethods inherited from class org.miaixz.bus.pager.dialect.AbstractRowBounds
afterAll, afterCount, afterPage, beforeCount, beforePage, getPageSql, processParameterObject, skipMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.miaixz.bus.pager.Dialect
asyncCountTask, isAsyncCount
-
Constructor Details
-
SqlServer2012RowBounds
public SqlServer2012RowBounds()
-
-
Method Details
-
getPageSql
public String getPageSql(String sql, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.cache.CacheKey pageKey) Generates the SQL Server 2012-specific pagination SQL usingRowBounds. It appends `OFFSET ? ROWS FETCH NEXT ? ROWS ONLY` to the original SQL.- Overrides:
getPageSqlin classSqlServerRowBounds- Parameters:
sql- the original SQL stringrowBounds- theRowBoundsobject containing offset and limitpageKey- the CacheKey for the paginated query- Returns:
- the SQL Server 2012-specific paginated SQL string
-