Module bus.pager

Class Hsqldb

All Implemented Interfaces:
Dialect

public class Hsqldb extends AbstractPaging
Database dialect for Hsqldb. This class provides Hsqldb-specific implementations for pagination SQL generation and parameter processing.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • Hsqldb

      public Hsqldb()
  • Method Details

    • processPageParameter

      public Object processPageParameter(org.apache.ibatis.mapping.MappedStatement ms, Map<String,Object> paramMap, Page page, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.cache.CacheKey pageKey)
      Processes the pagination parameters for Hsqldb. It adds PAGEPARAMETER_FIRST (limit) and PAGEPARAMETER_SECOND (offset) to the parameter map and updates the CacheKey. It also modifies the BoundSql's parameter mappings to include these pagination parameters.
      Specified by:
      processPageParameter in class AbstractPaging
      Parameters:
      ms - the MappedStatement object
      paramMap - a map containing the query parameters
      page - the Page object containing pagination details
      boundSql - the BoundSql object for the query
      pageKey - the CacheKey for the paginated query
      Returns:
      the processed parameter map
    • getPageSql

      public String getPageSql(String sql, Page page, org.apache.ibatis.cache.CacheKey pageKey)
      Generates the Hsqldb-specific pagination SQL. It appends LIMIT ? and optionally OFFSET ? to the original SQL.
      Specified by:
      getPageSql in class AbstractPaging
      Parameters:
      sql - the original SQL string
      page - the Page object containing pagination details
      pageKey - the CacheKey for the paginated query
      Returns:
      the Hsqldb-specific paginated SQL string