moxiangsheng / Mybatis-PageHelper

Mybatis通用分页插件

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#MyBatis Pagination - PageHelper

中文版文档

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

PageHelper support any complex single-table, multi-table queries. Some special cases please see the Important note.

Want to use PageHelper? Please see How to use PageHelper.

##Physical Paging

PageHelper supports the following databases:

  1. Oracle
  2. Mysql
  3. MariaDB
  4. SQLite
  5. Hsqldb
  6. PostgreSQL
  7. DB2
  8. SqlServer(2005,2008)
  9. Informix
  10. H2
  11. SqlServer2012
  12. Derby

PageHelper will detect the current database url by default, automatically select the corresponding database dialect.

You can configure helperDialect Property to specify the dialect. You can use the following abbreviations :

oracle, mysql, mariadb, sqlite, hsqldb, postgresql, db2, sqlserver, informix, h2, sqlserver2012, derby

Or You can use the dialect full name, such as com.github.pagehelper.dialect.helper.MySqlDialect.

Special note : When using the SqlServer2012 database, you need to manually specify for sqlserver2012, otherwise it will use the SqlServer2005 for paging.

##MyBatis Tools:http://mybatis.tk ##mybatis-3 https://github.com/mybatis/mybatis-3 ##Support MyBatis 3.1.0+

##PageHelper 5.0 Due to pagination plugin version 5.0 and 4.2. X completely different, so the master branch is 5.X version. version 4.2 exists as a branch, if you have PR for 4.2, please submitted to the branch.

##Latest Release 5.0.0-rc

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

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

<dependency>
    <groupId>com.github.pagehelper</groupId>
    <artifactId>pagehelper</artifactId>
    <version>5.0.0-rc</version>
</dependency>

##Latest Changelog

###5.0.0-rc

  • fix bug #149
  • renamed Db2RowDialect to Db2RowBoundsDialect
  • All thrown exceptions being replaced by PageException
  • Update Tutorials

###5.0.0-beta

  • Use a better way to handle paging logic
  • New pagination plugin interceptor com.github.pagehelper.PageInterceptor
  • New Dialect PageHelper is a special implementation class, the previous function is implemented in more user-friendly ways
  • New pagination plugin only a dialect parameter, the default dialect is PageHelper
  • PageHelper continue to support previously provided parameters, Among the latest to use the document has been fully updated
  • PageHelper has a helperDialect parameter which is the same functional as the previous dialect
  • Added paging implementation based on pure RowBounds and PageRowBounds, in com.github. pagehelper. dialect. rowbounds package, it is used as dialect Parameter sample implementation, more detailed documentation will be added later
  • Removed inappropriate orderby functions that appear in pagination plugin. It will provide a separate sort plug-ins in the future
  • Remove PageHelper are less commonly used methods
  • A new document, an important part of the update has been mentioned in the changelog, provides the English version of this document

##Documentation

###How to use the PageHelper

If you are unfamiliar with Spring integration, you can refer to the following two MyBatis and Spring Integration Framework:

The two Integrated Framework integrates PageHelper and Common Mapper

###How to use in simple RowBounds style

###Implement your own pagination plugin

  • helperDialect style
  • dialect style

##Changelog

##Important note

##Submit BUG

##Author Info

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

Email: abel533@gmail.com

QQ Group: MyBatis

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

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

About

Mybatis通用分页插件

License:MIT License


Languages

Language:Java 100.0%