MCPcopy Index your code
hub / github.com/pagehelper-org/Mybatis-PageHelper

github.com/pagehelper-org/Mybatis-PageHelper @6.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 6.1.1 ↗ · + Follow
845 symbols 3,094 edges 161 files 269 documented · 32% 5 cross-repo links updated 3mo agov6.1.1 · 2025-06-19★ 12,35957 open issues

Browse by type

Functions 671 Types & classes 174
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MyBatis Pagination - PageHelper

MyBatis Pagination - PageHelper

Build Status Maven central

中文版文档

If you are using MyBatis, it is recommended to try this pagination plugin. This must be the MOST CONVENIENT pagination plugin.

PageHelper supports any complex single-table, multi-table queries. As to some special cases, please refer to the Important note.

Want to use PageHelper? Please check out How to use PageHelper.

New JavaDoc

https://apidoc.gitee.com/free/Mybatis_PageHelper

APIs: https://apidoc.gitee.com/free/Mybatis_PageHelper/com/github/pagehelper/page/PageMethod.html

《MyBatis 从入门到精通》

MyBatis 从入门到精通

京东当当Amazon

CSDN Blog:http://blog.csdn.net/isea533/article/details/73555400

GitHub:https://github.com/mybatis-book/book

Support MyBatis 3.1.0+

PageHelper 6 Support jdk8+

PageHelper 5 Support jdk6+

Physical Paging

PageHelper supports the following databases PageAutoDialect:

static {
    //register alias
    registerDialectAlias("hsqldb",HsqldbDialect.class);
    registerDialectAlias("h2",HsqldbDialect.class);
    registerDialectAlias("phoenix",HsqldbDialect.class);

    registerDialectAlias("postgresql",PostgreSqlDialect.class);

    registerDialectAlias("mysql",MySqlDialect.class);
    registerDialectAlias("mariadb",MySqlDialect.class);
    registerDialectAlias("sqlite",MySqlDialect.class);

    registerDialectAlias("herddb",HerdDBDialect.class);

    registerDialectAlias("oracle",OracleDialect.class);
    registerDialectAlias("oracle9i",Oracle9iDialect.class);
    registerDialectAlias("db2",Db2Dialect.class);
    registerDialectAlias("as400",AS400Dialect.class);
    registerDialectAlias("informix",InformixDialect.class);
    //Solve informix-sqli #129, still keep the above
    registerDialectAlias("informix-sqli",InformixDialect.class);

    registerDialectAlias("sqlserver",SqlServerDialect.class);
    registerDialectAlias("sqlserver2012",SqlServer2012Dialect.class);

    registerDialectAlias("derby",SqlServer2012Dialect.class);
    //达梦数据库,https://github.com/mybatis-book/book/issues/43
    registerDialectAlias("dm",OracleDialect.class);
    //阿里云PPAS数据库,https://github.com/pagehelper/Mybatis-PageHelper/issues/281
    registerDialectAlias("edb",OracleDialect.class);
    //神通数据库
    registerDialectAlias("oscar",OscarDialect.class);
    registerDialectAlias("clickhouse",MySqlDialect.class);
    //瀚高数据库
    registerDialectAlias("highgo",HsqldbDialect.class);
    //虚谷数据库
    registerDialectAlias("xugu",HsqldbDialect.class);
    registerDialectAlias("impala",HsqldbDialect.class);
    registerDialectAlias("firebirdsql",FirebirdDialect.class);
    //人大金仓数据库
    registerDialectAlias("kingbase",PostgreSqlDialect.class);
    // 人大金仓新版本kingbase8
    registerDialectAlias("kingbase8",PostgreSqlDialect.class);
    //行云数据库
    registerDialectAlias("xcloud",CirroDataDialect.class);

    //openGauss数据库
    registerDialectAlias("opengauss",PostgreSqlDialect.class);

    //注册 AutoDialect
    //If you want to achieve the same effect as the previous version, you can configure it autoDialectClass=old
    registerAutoDialectAlias("old",DefaultAutoDialect.class);
    registerAutoDialectAlias("hikari",HikariAutoDialect.class);
    registerAutoDialectAlias("druid",DruidAutoDialect.class);
    registerAutoDialectAlias("tomcat-jdbc",TomcatAutoDialect.class);
    registerAutoDialectAlias("dbcp",DbcpAutoDialect.class);
    registerAutoDialectAlias("c3p0",C3P0AutoDialect.class);
    //If not configured, it is used by default DataSourceNegotiationAutoDialect
    registerAutoDialectAlias("default",DataSourceNegotiationAutoDialect.class);
}

If the database you are using is not in this list, you can configure the dialectAlias parameter.

This parameter allows to configure the alias of a custom implementation, which can be used to automatically obtain the corresponding implementation according to the JDBCURL, and allows to overwrite the existing implementation in this way. The configuration example is as follows (use semicolons to separate multiple alias):

```xml

```

Use QueryInterceptor spec

Installation

To use PageHelper, you just need to include the pagehelper-x.y.z.jar and jsqlparser-x.y.z.jar file in the classpath.

For version matching relation, please refer to the dependent version in pom.

If you are using Maven, you could just add the following dependency to your pom.xml:


<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper</artifactId>
    <version>latest version</version>
</dependency>

If you are using Spring Boot, You can refer to the pagehelper-spring-boot-starter

More...

Documentation

Spring integration sample

Submit BUG

https://github.com/pagehelper/Mybatis-PageHelper/issues/new

微信公众号

Thank you for your support

Buy the author a cup of coffee!

Author Info

Web: https://mybatis.io

Blog: http://blog.csdn.net/isea533

Email: abel533@gmail.com

PageHelper on github:https://github.com/pagehelper/Mybatis-PageHelper

PageHelper on gitosc:http://git.oschina.net/free/Mybatis_PageHelper

MyBatis-3

  • Project:https://github.com/mybatis/mybatis-3
  • Document:https://mybatis.org/mybatis-3/index.html

MyBatis 专栏:

Thanks to all the people who already contributed!

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 671
Class 155
Interface 17
Enum 2

Languages

Java100%

Modules by API surface

src/test/java/com/github/pagehelper/model/UserExample.java69 symbols
src/main/java/com/github/pagehelper/Page.java65 symbols
src/main/java/com/github/pagehelper/PageInfo.java43 symbols
src/test/java/com/github/pagehelper/mapper/UserMapper.java41 symbols
src/test/java/com/github/pagehelper/sql/SqlServerTest.java27 symbols
src/main/java/com/github/pagehelper/page/PageAutoDialect.java15 symbols
src/test/java/com/github/pagehelper/sql/SqlTest.java14 symbols
src/main/java/com/github/pagehelper/dialect/AbstractHelperDialect.java14 symbols
src/main/java/com/github/pagehelper/PageHelper.java14 symbols
src/main/java/com/github/pagehelper/Dialect.java13 symbols
src/main/java/com/github/pagehelper/parser/defaults/DefaultSqlServerSqlParser.java12 symbols
src/main/java/com/github/pagehelper/parser/defaults/DefaultCountSqlParser.java12 symbols

Dependencies from manifests, versioned

ch.qos.logback:logback-classic1.2.13 · 1×
com.alibaba:druid1.2.12 · 1×
com.google.guava:guava33.4.8-jre · 1×
com.h2database:h21.4.190 · 1×
com.ibm:db21.0.0 · 1×
com.mchange:c3p00.9.5.5 · 1×
com.oracle:ojdbc1410.2.0.4.0 · 1×
com.xugudb:xugu-jdbc12.2.0 · 1×
junit:junit4.13.2 · 1×
mysql:mysql-connector-java8.0.33 · 1×
net.sourceforge.jtds:jtds1.3.1 · 1×

Datastores touched

(mysql)Database · 1 repos
pagehelperDatabase · 1 repos
pagehelperDatabase · 1 repos
employeesDatabase · 1 repos

For agents

$ claude mcp add Mybatis-PageHelper \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page