Skip to content

Commit

Permalink
feat: 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
xuejmnet committed May 13, 2024
1 parent 87d554a commit 32ba8ce
Show file tree
Hide file tree
Showing 36 changed files with 130 additions and 44 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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
</parent>

<artifactId>console-demo</artifactId>
Expand All @@ -22,21 +22,21 @@
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-mysql</artifactId>
<version>2.0.6</version>
<version>2.0.7</version>
<scope>compile</scope>
</dependency>
<!-- apt生成代理类 -->
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-processor</artifactId>
<version>2.0.6</version>
<version>2.0.7</version>
<scope>compile</scope>
</dependency>
<!-- 代理api -->
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-api-proxy</artifactId>
<version>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-processor</artifactId>
<version>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-springboot-starter</artifactId>
<version>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.easy-query</groupId>
<artifactId>sql-springboot-starter</artifactId>
<version>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
</parent>

<artifactId>sql-db-support</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sql-db-support/sql-clickhouse/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>2.0.6</version>
<version>2.0.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>

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>2.0.6</version>
<version>2.0.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>

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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>sql-kingbase-es</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.easy.query.kingbase.es.func;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.expression.parser.core.base.scec.core.SQLNativeChainExpressionContext;
import com.easy.query.core.func.column.ColumnExpression;
import com.easy.query.core.func.def.AbstractExpressionSQLFunction;
import com.easy.query.core.util.EasyCollectionUtil;
Expand All @@ -28,7 +27,8 @@ public KingbaseESConcatSQLFunction(List<ColumnExpression> concatExpressions) {
@Override
public String sqlSegment(TableAvailable defaultTable) {
Iterable<String> params = EasyCollectionUtil.select(columnExpressions, (t, i) ->i==0?"{" + i + "}::TEXT": "{" + i + "}");
return String.format("%s", String.join(" || ", params));
// return String.format("%s", String.join(" || ", params));
return String.format("CONCAT(%s)", String.join(",", params));
}

@Override
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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
<relativePath>../../pom.xml</relativePath>
</parent>

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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</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>2.0.6</version>
<version>2.0.7</version>
</parent>

<artifactId>sql-api-proxy</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.easy.query.core.proxy.extension.functions.entry;

import com.easy.query.core.basic.api.select.Query;
import com.easy.query.core.proxy.PropTypeColumn;

/**
Expand All @@ -16,6 +17,20 @@ public interface ConcatExpressionSelector {
*/
ConcatExpressionSelector value(String val);

/**
* 格式化处理
* @param valFormat
* @return
*/
ConcatExpressionSelector format(Object valFormat);

/**
* 接受子查询
* @param subQuery
* @return
*/
ConcatExpressionSelector subQuery(Query<?> subQuery);


/**
* 可以是函数也可以是列
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.easy.query.core.proxy.extension.functions.entry;

import com.easy.query.core.basic.api.select.Query;
import com.easy.query.core.func.SQLFunc;
import com.easy.query.core.func.SQLFunction;
import com.easy.query.core.func.column.ColumnFuncSelector;
Expand Down Expand Up @@ -27,6 +28,18 @@ public ConcatExpressionSelector value(String val) {
return this;
}

@Override
public ConcatExpressionSelector format(Object valFormat) {
columnFuncSelector.format(valFormat);
return this;
}

@Override
public ConcatExpressionSelector subQuery(Query<?> subQuery) {
columnFuncSelector.subQuery(subQuery);
return this;
}

@Override
public ConcatExpressionSelector expression(PropTypeColumn<String> propTypeColumn) {
if(propTypeColumn instanceof DSLSQLFunctionAvailable){
Expand Down
Loading

0 comments on commit 32ba8ce

Please sign in to comment.