Skip to content

Commit

Permalink
Merge branch 'dev' into 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chenrenfei committed Dec 19, 2023
2 parents b6838f9 + 87fc8da commit a5da6e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions trunk/sqltoy-orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sagframe</groupId>
<version>5.2.86</version>
<version>5.2.87</version>
<name>sagacity-sqltoy</name>
<description>sagacity-sqltoy</description>
<artifactId>sagacity-sqltoy</artifactId>
Expand All @@ -18,7 +18,7 @@
<httpclient.version>4.5.14</httpclient.version>
<httpclient-httpmime.version>4.5.14</httpclient-httpmime.version>
<httpclient-core.version>4.4.16</httpclient-core.version>
<elastic-rest-client.version>8.11.2</elastic-rest-client.version>
<elastic-rest-client.version>8.11.3</elastic-rest-client.version>
<fastjson.version>2.0.43</fastjson.version>
<mongo.version>3.12.14</mongo.version>
<junit-jupiter.version>5.10.1</junit-jupiter.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ public class SqlToyConstants {
// update 2020-9-16 将\\W 替换为[^A-Za-z0-9_:] 增加排除: 适应::jsonb 这种模式场景
// update 2021-10-13 增加参数名称为中文场景(应对一些极为不规范的项目场景)
// update 2023-8-17 增加支持:itemSet[0].paramName 模式(之前只支持:itemSet[0])
// update 2023-12-19 去除_开始的匹配限制
public final static Pattern SQL_NAMED_PATTERN = Pattern.compile(
"[^A-Za-z0-9_:\u4e00-\u9fa5]\\:\\s*[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*(\\.[\\w\u4e00-\u9fa5]+)*(\\[\\d+\\](\\.[a-zA-Z0-9_\u4e00-\u9fa5]+)*)?\\s?");
"[^A-Za-z0-9:\u4e00-\u9fa5]\\:\\s*[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*(\\.[\\w\u4e00-\u9fa5]+)*(\\[\\d+\\](\\.[a-zA-Z0-9_\u4e00-\u9fa5]+)*)?\\s?");
public final static Pattern NOSQL_NAMED_PATTERN = Pattern.compile(
"(?i)\\@(param|blank|value)?\\(\\s*\\:\\s*[a-zA-Z\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*(\\.[\\w\u4e00-\u9fa5]+)*(\\[\\d+\\](\\.[a-zA-Z0-9_\u4e00-\u9fa5]+)*)?\\s*\\)");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ public SqlToyConfig getSqlConfig(String sqlKey, SqlType sqlType, String dialect,
// 复制一份,避免直接修改sql缓存中的模型
if (isParamInclude) {
result = result.clone();
result.clearDialectSql();
}
// 替换include的实际sql
String sql = MacroUtils.replaceMacros(result.getSql(), (Map) sqlCache, paramValues, false, macros);
Expand Down
4 changes: 2 additions & 2 deletions trunk/sqltoy-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sagframe</groupId>
<version>5.2.86</version>
<version>5.2.87</version>
<name>sagacity-sqltoy-starter</name>
<artifactId>sagacity-sqltoy-starter</artifactId>
<description>sqltoy springboot starter</description>
<url>https://github.com/sagframe/sagacity-sqltoy</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-boot.version>2.7.18</spring-boot.version>
<sqltoy.version>5.2.86</sqltoy.version>
<sqltoy.version>5.2.87</sqltoy.version>
</properties>
<licenses>
<license>
Expand Down

0 comments on commit a5da6e5

Please sign in to comment.