Releases: sagframe/sagacity-sqltoy
5.2.93 修复@loop和sql日志中localDateTime纳秒输出缺陷(请按需升级)
1、修复@loop和sql日志中localDateTime纳秒输出缺陷
感谢 @郁晨 反馈
5.3.66 同步发版
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.93</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.93</version>
</dependency>
5.2.92 修复cte中含@fastPage且union 场景的缺陷
1、修复含with as (select * from @fast( ... union all )) select * from table,极端场景下分页查询count未正确处理union 的缺陷
5.3.65 同步发版
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.92</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.92</version>
</dependency>
5.2.91 修复updateByQuery中UnifyFieldsHandler未判null引发的空指针异常
1、修复updateByQuery中UnifyFieldsHandler未判null引发的空指针异常
5.3.64 同步发版
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.91</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.91</version>
</dependency>
5.2.90 增强loop中LocalDateTime和LocalTime的输出精度
1、增强loop中LocalDateTime和LocalTime的输出精度
5.3.63 同步发版
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.90</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.90</version>
</dependency>
5.2.89 优化数据库关键词设置顺序,修复设置packagesToScan导致关键词失效
1、优化数据库关键词设置顺序,提前到EntityManager.initialize()前面,修复设置packagesToScan导致关键词失效问题
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.89</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.89</version>
</dependency>
5.2.88 支持通过pojo自动生成表结构和自动建表
1、增强link功能,增加result-type="LIST|ARRAY" 特性,colunns只能是单列场景适配
<sql id="qstart_link_case">
<value>
<![CDATA[
select t.ORGAN_ID ,t.ORGAN_ID ORGAN_NAME, t.STAFF_NAME
from sqltoy_staff_info t
order by t.ORGAN_ID
]]>
</value>
<!-- 将机构下面的员工组织成一个数组或List,columns只能单个列适用 -->
<link id-columns="ORGAN_ID" columns="STAFF_NAME" result-type="LIST" distinct="true" />
<!-- 将机构下面的多个员工用逗号拼接成单个字符串 -->
<!--<link id-columns="ORGAN_ID" columns="STAFF_NAME" sign="," distinct="true" />-->
</sql>
2、支持通过pojo自动生成表结构和自动建表(默认支持mysql、postgresql、oracle、sqlserver)
自行扩展需要实现的接口(mysql、postgresql、oracle、sqlserver提供了默认实现,无需扩展)
package org.sagacity.sqltoy.plugins.ddl;
import org.sagacity.sqltoy.model.TableMeta;
public interface DialectDDLGenerator {
/**
* @TODO 根据单个POJO产生创建表的sql
* @param tableMeta
* @param schema 仅针对sqlserver生成表或字段注释有效,其它数据库填null即可
* @param dbType
* @return
*/
public default String createTableSql(TableMeta tableMeta,String schema, int dbType) {
return null;
}
}
说明:yml配置中要设置packagesToScan 和 autoDDL,同时quickvo要使用5.2.0版本
# 增加包扫描路径,打开autoDDL
spring:
sqltoy:
packagesToScan:
- com.sqltoy.quickstart.vo
autoDDL: true
#dialectDDLGenerator: com.xxxx.自定义扩展实现类
## 演示生成文件
@Test
public void testCreateSqlFile() {
String[] scanPackages = new String[] { "com.sqltoy.quickstart.vo" };
try {
DDLFactory.createSqlFile(scanPackages, "D://sqltoy.sql", DBType.POSTGRESQL,null, null);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.88</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.88</version>
</dependency>
5.2.88.RC5 支持通过pojo自动生成表结构和自动建表
1、支持通过pojo自动生成表结构和自动建表(默认支持mysql、postgresql、oracle、sqlserver)
package org.sagacity.sqltoy.plugins.ddl;
import org.sagacity.sqltoy.model.TableMeta;
public interface DialectDDLGenerator {
/**
* @TODO 根据单个POJO产生创建表的sql
* @param tableMeta
* @param schema 仅针对sqlserver生成表或字段注释有效,其它数据库填null即可
* @param dbType
* @return
*/
public default String createTableSql(TableMeta tableMeta,String schema, int dbType) {
return null;
}
}
说明:yml配置中要设置packagesToScan 和 autoDDL,同时quickvo要使用5.2.0版本
# 增加包扫描路径,打开autoDDL
spring:
sqltoy:
packagesToScan:
- com.sqltoy.quickstart.vo
autoDDL: true
#dialectDDLGenerator: com.xxxx.自定义扩展实现类
## 演示生成文件
@Test
public void testCreateSqlFile() {
String[] scanPackages = new String[] { "com.sqltoy.quickstart.vo" };
try {
DDLFactory.createSqlFile(scanPackages, "D://sqltoy.sql", DBType.POSTGRESQL,null, null);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.88.RC5</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.88.RC5</version>
</dependency>
5.2.87 修复@include(:sqlscript)动态sql片段未清理缓存的缺陷
1、修复@include(:sqlscript)动态sql片段未清理缓存的缺陷
2、优化:paramName匹配,支持xxx_:paramName下划线相邻的场景
5.3.60 同步发版
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.87</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.87</version>
</dependency>
5.2.86 中文日期解析优化、其他部分代码编写优化
1、中文日期解析优化、其他部分代码编写优化 (非关键缺陷,请选择性升级)
5.3.59 同步发版
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.86</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.86</version>
</dependency>
5.2.85 优化DateUtil工具类,强化英文格式解析
1、优化DateUtil工具类,支持英文格式、中文格式字符串自动解析,并强化兼容性,强化格式化,采用LocalDateTime和LocalTime对应的解析,提升微秒、纳秒的解析精度
5.3.58 同步发版
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy</artifactId>
<version>5.2.85</version>
</dependency>
<dependency>
<groupId>com.sagframe</groupId>
<artifactId>sagacity-sqltoy-starter</artifactId>
<version>5.2.85</version>
</dependency>