Giter Site home page Giter Site logo

mybatis-pagehelper's Introduction

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

Physical Paging

PageHelper supports the following databases PageAutoDialect:

static {
    //register aliass
    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("informix", InformixDialect.class); 
    //解决 informix-sqli #129,仍然保留上面的 
    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); 
}

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):

<property name="dialectAlias" value="oracle=com.github.pagehelper.dialect.helper.OracleDialect"/>

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

Thanks for free JetBrains Open Source license

Author Info

Web: https://mybatis.io

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

Email: [email protected]

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

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

mybatis-pagehelper's People

Contributors

abel533 avatar moonfruit avatar panmingzhi815 avatar pagehelper avatar xianlaioy avatar lvshuyan avatar luozhenyu avatar alenx-zheng avatar muyun12 avatar dhhua avatar angrydisk avatar lihongzheshuai avatar siwet avatar miniministar avatar miaogr86 avatar ijliym avatar liumian97 avatar iimik avatar lenosp avatar leaves615 avatar ashaiqing avatar hearen avatar majinkai avatar mallim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.