Skip to content

Commit

Permalink
feat: 0.1.48
Browse files Browse the repository at this point in the history
  • Loading branch information
xuejmnet committed Apr 2, 2024
1 parent b6f399d commit b9d5356
Show file tree
Hide file tree
Showing 44 changed files with 385 additions and 99 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<packaging>pom</packaging>
<version>1.10.47</version>
<version>1.10.48</version>
<name>easy-query</name>
<description>java object query distributed connector</description>
<url>https://github.com/xuejmnet/easy-query</url>
Expand Down
8 changes: 4 additions & 4 deletions samples/console-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>samples</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>

<artifactId>console-demo</artifactId>
Expand All @@ -22,21 +22,21 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-mysql</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<!-- apt生成代理类 -->
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-processor</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<!-- 代理api -->
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-api-proxy</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<!-- mysql驱动 -->
Expand Down
6 changes: 3 additions & 3 deletions samples/easy-query-solon-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>samples</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>

<groupId>com.easy.query.solon</groupId>
Expand All @@ -22,13 +22,13 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-solon-plugin</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-processor</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion samples/multi-datasource-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-springboot-starter</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>easy-query-all</artifactId>
<groupId>com.easy-query</groupId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-springboot-starter</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions samples/solon-sharding-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>samples</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>

<groupId>com.easy.query</groupId>
Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-solon-plugin</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions samples/spring-sharding-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-processor</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-springboot-starter</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions samples/springbootdemo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-processor</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-springboot-starter</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>
<!-- &lt;!&ndash; https://mvnrepository.com/artifact/com.alibaba/druid &ndash;&gt;-->
Expand Down Expand Up @@ -108,7 +108,7 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-cache</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<scope>compile</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion sql-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>easy-query-all</artifactId>
<groupId>com.easy-query</groupId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>

<artifactId>sql-db-support</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-dameng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){

sql.append(this.projects.toSQL(toSQLContext));
boolean hasOrderBy = this.order != null && this.order.isNotEmpty();
boolean hasGroup = this.group != null && this.group.isNotEmpty();
if (!hasOrderBy && offset > 0) {
sql.append(", ROWNUM AS ").append(rowNum);
}
Expand Down Expand Up @@ -88,7 +89,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){
sql.append(whereSQL);
}
}
if (!hasOrderBy && (offset > 0 || rows > 0)) {
if (!hasOrderBy && !hasGroup && (offset > 0 || rows > 0)) {
if(!hasWhere){
sql.append(" WHERE ROWNUM < ");
}else{
Expand All @@ -97,7 +98,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){
sql.append(offset+rows+1);
}
boolean onlyWhere = true;
if (this.group != null && this.group.isNotEmpty()) {
if (hasGroup) {
onlyWhere = false;
sql.append(" GROUP BY ").append(this.group.toSQL(toSQLContext));
}
Expand All @@ -110,7 +111,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){
sql.append(" ORDER BY ").append(this.order.toSQL(toSQLContext));
}

if(!hasOrderBy){
if(!hasOrderBy&&!hasGroup){
if(offset>0){
sql.insert(0, "SELECT rt.* FROM(").append(") rt WHERE rt.").append(rowNum).append(" > ").append(offset);
}
Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-gauss-db/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-h2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-kingbase-es/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>sql-kingbase-es</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-mssql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-mysql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-oracle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){

sql.append(this.projects.toSQL(toSQLContext));
boolean hasOrderBy = this.order != null && this.order.isNotEmpty();
boolean hasGroup = this.group != null && this.group.isNotEmpty();
if (!hasOrderBy && offset > 0) {
sql.append(", ROWNUM AS ").append(rowNum);
}
Expand Down Expand Up @@ -89,7 +90,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){
sql.append(whereSQL);
}
}
if (!hasOrderBy && (offset > 0 || rows > 0)) {
if (!hasOrderBy &&!hasGroup && (offset > 0 || rows > 0)) {
if(!hasWhere){
sql.append(" WHERE ROWNUM < ");
}else{
Expand All @@ -98,7 +99,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){
sql.append(offset+rows+1);
}
boolean onlyWhere = true;
if (this.group != null && this.group.isNotEmpty()) {
if (hasGroup) {
onlyWhere = false;
sql.append(" GROUP BY ").append(this.group.toSQL(toSQLContext));
}
Expand All @@ -111,7 +112,7 @@ protected String toSQL0(boolean root,ToSQLContext toSQLContext){
sql.append(" ORDER BY ").append(this.order.toSQL(toSQLContext));
}

if(!hasOrderBy){
if(!hasOrderBy&&!hasGroup ){
if(offset>0){
sql.insert(0, "SELECT rt.* FROM(").append(") rt WHERE rt.").append(rowNum).append(" > ").append(offset);
}
Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-pgsql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-sqlite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>

<artifactId>sql-extension</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sql-extension/sql-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-extension/sql-kt-springboot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-extension/sql-solon-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-extension/sql-springboot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sql-platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>easy-query-all</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>

<artifactId>sql-platform</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sql-platform/sql-api-proxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.easy-query</groupId>
<artifactId>sql-platform</artifactId>
<version>1.10.47</version>
<version>1.10.48</version>
</parent>

<artifactId>sql-api-proxy</artifactId>
Expand Down
Loading

0 comments on commit b9d5356

Please sign in to comment.