Code Monkey home page Code Monkey logo

mybatis-pagehelper's Introduction

#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-beta

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-beta</version>
</dependency>

##Latest Changelog

###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: [email protected]

QQ Group: MyBatis

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 pagehelper avatar dhhua avatar mallim avatar majinkai avatar leaves615 avatar siwet avatar lihongzheshuai avatar

Watchers

James Cloos avatar 胡泽 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.