java.lang.Object
org.miaixz.bus.pager.dialect.AbstractDialect
org.miaixz.bus.pager.dialect.AbstractPaging
org.miaixz.bus.pager.dialect.base.Oracle
- All Implemented Interfaces:
Dialect
Database dialect for Oracle. This class provides Oracle-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 Oracle-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 Oracle.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
-
Oracle
public Oracle()
-
-
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 Oracle. It addsPAGEPARAMETER_FIRST(end row) andPAGEPARAMETER_SECOND(start row) to the parameter map and updates theCacheKey.- 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 Oracle-specific pagination SQL. It wraps the original SQL with a subquery that usesROWNUMto achieve pagination.- Specified by:
getPageSqlin classAbstractPaging- Parameters:
sql- the original SQL stringpage- thePageobject containing pagination detailspageKey- the CacheKey for the paginated query- Returns:
- the Oracle-specific paginated SQL string
-