Skip to content

Commit

Permalink
PageHelper 6 发布,支持jdk8+
Browse files Browse the repository at this point in the history
  • Loading branch information
pagehelper committed Nov 5, 2023
1 parent 19043df commit 8961063
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 184 deletions.
48 changes: 34 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@

想要使用分页插件?请看[如何使用分页插件](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/HowToUse.md)

## 新增 JavaDoc 文档

文档地址:https://apidoc.gitee.com/free/Mybatis_PageHelper

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

## 《MyBatis 从入门到精通》

![MyBatis 从入门到精通](https://github.com/mybatis-book/book/raw/master/book.png)
Expand All @@ -31,6 +25,10 @@ GitHub项目:https://github.com/mybatis-book/book

## 支持 [MyBatis 3.1.0+](https://github.com/mybatis/mybatis-3)

## PageHelper 6 支持 jdk8+

## PageHelper 5 支持 jdk6+

## 物理分页

该插件目前支持以下数据库的<b>物理分页</b> [PageAutoDialect](src/main/java/com/github/pagehelper/page/PageAutoDialect.java):
Expand All @@ -41,19 +39,26 @@ static {
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);
//解决 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);
Expand All @@ -66,8 +71,28 @@ static {
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
//想要实现和以前版本相同的效果时,可以配置 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);
//不配置时,默认使用 DataSourceNegotiationAutoDialect
registerAutoDialectAlias("default",DataSourceNegotiationAutoDialect.class);
}
```

Expand All @@ -77,20 +102,16 @@ static {
>
>```xml
><property name="dialectAlias" value="oracle=com.github.pagehelper.dialect.helper.OracleDialect"/>
><!-- 支持下面的引用方式,引用 Oracle9iDialect.class 的实现 -->
><!-- 6.0支持下面的引用方式,引用 Oracle9iDialect.class 的实现 -->
><property name="dialectAlias" value="oracle=oracle9i"/>
><!-- 支持下面的引用方式,达梦使用oracle语法分页,简化类全名写法 -->
><!-- 6.0支持下面的引用方式,达梦使用oracle语法分页,简化类全名写法 -->
><property name="dialectAlias" value="dm=oracle"/>
>```
## 使用 [QueryInterceptor 规范](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/src/main/java/com/github/pagehelper/QueryInterceptor.java)
[Executor 拦截器高级教程 - QueryInterceptor 规范](https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/Interceptor.md)
## 分页插件 5.0
由于分页插件 5.0 版本和 4.2.x 实现完全不同,所以 master 分支为 5.x 版本,4.2 作为一个分支存在,如果有针对 4.2 的 PR,请注意提交到分支版本。
## 集成
使用 PageHelper 你只需要在 classpath
Expand Down Expand Up @@ -128,8 +149,7 @@ static {

## 提交 BUG

- [提交到 github](https://github.com/pagehelper/Mybatis-PageHelper/issues/new)
- [提交到 gitosc](http://git.oschina.net/free/Mybatis_PageHelper/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=)
https://github.com/pagehelper/Mybatis-PageHelper/issues/new

## 项目的发展离不开你的支持

Expand Down
52 changes: 45 additions & 7 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,41 @@ GitHub:https://github.com/mybatis-book/book

## Support [MyBatis 3.1.0+](https://github.com/mybatis/mybatis-3)

## PageHelper 6 Support jdk8+

## PageHelper 5 Support jdk6+

## Physical Paging

PageHelper supports the following
databases [PageAutoDialect](src/main/java/com/github/pagehelper/page/PageAutoDialect.java):

```java
static {
//register aliass
//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);
//解决 informix-sqli #129,仍然保留上面的
//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);
Expand All @@ -73,10 +84,28 @@ static {
registerDialectAlias("highgo",HsqldbDialect.class);
//虚谷数据库
registerDialectAlias("xugu",HsqldbDialect.class);
registerDialectAlias("impala",HsqldbDialect.class);
registerDialectAlias("firebirdsql",FirebirdDialect.class);
//人大金仓数据库
registerDialectAlias("kingbase",PostgreSqlDialect.class);
//华为openGauss数据库
// 人大金仓新版本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);
}
```

Expand All @@ -89,9 +118,9 @@ static {
>
>```xml
><property name="dialectAlias" value="oracle=com.github.pagehelper.dialect.helper.OracleDialect"/>
><!-- The following reference is supported, referencing the implementation of Oracle9iDialect.class -->
><!-- 6.0 The following reference is supported, referencing the implementation of Oracle9iDialect.class -->
><property name="dialectAlias" value="oracle=oracle9i"/>
><!-- To support the following citation methods, DM uses oracle syntax for pagination to simplify the writing of the full name of the class -->
><!-- 6.0 To support the following citation methods, DM uses oracle syntax for pagination to simplify the writing of the full name of the class -->
><property name="dialectAlias" value="dm=oracle"/>
>```
Expand Down Expand Up @@ -135,8 +164,7 @@ the [pagehelper-spring-boot-starter](https://github.com/pagehelper/pagehelper-sp

## Submit BUG

- [Submit to github](https://github.com/pagehelper/Mybatis-PageHelper/issues/new)
- [Submit to gitosc](http://git.oschina.net/free/Mybatis_PageHelper/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=)
https://github.com/pagehelper/Mybatis-PageHelper/issues/new

## Thank you for your support

Expand All @@ -157,3 +185,13 @@ Email: [email protected]
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 专栏:

- [MyBatis Sample](http://blog.csdn.net/column/details/mybatis-sample.html)
- [MyBatis QA](http://blog.csdn.net/column/details/mybatisqa.html)
160 changes: 0 additions & 160 deletions README_zh.md

This file was deleted.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@

<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>6.0.0-SNAPSHOT</version>
<version>6.0.0</version>
<packaging>jar</packaging>

<name>pagehelper 5</name>
<name>pagehelper 6</name>
<description>Mybatis Pagination Plugin</description>
<url>https://github.com/pagehelper/Mybatis-PageHelper</url>

Expand Down
Loading

0 comments on commit 8961063

Please sign in to comment.