Module bus.pager

Class Db2RowBounds

All Implemented Interfaces:
Dialect

public class Db2RowBounds extends AbstractRowBounds
DB2 dialect for pagination based on RowBounds. This class provides DB2-specific SQL generation for pagination using offset and limit.
  • Constructor Details

    • Db2RowBounds

      public Db2RowBounds()
  • Method Details

    • getPageSql

      public String getPageSql(String sql, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.cache.CacheKey pageKey)
      Generates the DB2-specific pagination SQL using RowBounds. It wraps the original SQL with a subquery that uses ROWNUMBER() OVER() to achieve pagination.
      Specified by:
      getPageSql in class AbstractRowBounds
      Parameters:
      sql - the original SQL string
      rowBounds - the RowBounds object containing offset and limit
      pageKey - the CacheKey for the paginated query
      Returns:
      the DB2-specific paginated SQL string