java.lang.Object
org.miaixz.bus.pager.dialect.AbstractDialect
org.miaixz.bus.pager.dialect.AbstractPaging
org.miaixz.bus.pager.dialect.base.Hsqldb
- All Implemented Interfaces:
Dialect
Database dialect for Hsqldb. This class provides Hsqldb-specific implementations for pagination SQL generation and
parameter processing.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Field Summary
Fields inherited from class org.miaixz.bus.pager.dialect.AbstractPaging
PAGEPARAMETER_FIRST, PAGEPARAMETER_SECOND, SUFFIX_COUNT, SUFFIX_PAGEFields inherited from class org.miaixz.bus.pager.dialect.AbstractDialect
countSqlParser, orderBySqlParser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPageSql(String sql, Page page, org.apache.ibatis.cache.CacheKey pageKey) Generates the Hsqldb-specific pagination SQL.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.Methods inherited from class org.miaixz.bus.pager.dialect.AbstractPaging
afterAll, afterCount, afterPage, beforeCount, beforePage, getCountSql, getLocalPage, getPageSql, handleParameter, processParameterObject, setProperties, 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
-
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 addsPAGEPARAMETER_FIRST(limit) andPAGEPARAMETER_SECOND(offset) to the parameter map and updates theCacheKey. It also modifies theBoundSql's parameter mappings to include these pagination parameters.- Specified by:
processPageParameterin classAbstractPaging- Parameters:
ms- the MappedStatement objectparamMap- a map containing the query parameterspage- thePageobject containing pagination detailsboundSql- the BoundSql object for the querypageKey- the CacheKey for the paginated query- Returns:
- the processed parameter map
-
getPageSql
Generates the Hsqldb-specific pagination SQL. It appendsLIMIT ?and optionallyOFFSET ?to the original SQL.- Specified by:
getPageSqlin classAbstractPaging- Parameters:
sql- the original SQL stringpage- thePageobject containing pagination detailspageKey- the CacheKey for the paginated query- Returns:
- the Hsqldb-specific paginated SQL string
-