真正智慧的 ORM 框架 sqltoy-orm 5.6.46 发版


开源地址:

  • github: https://github.com/sagframe/sagacity-sqltoy
  • gitee: https://gitee.com/sagacity/sagacity-sqltoy
  • idea 插件 (可直接在 idea 中检索安装): https://github.com/imyuyu/sqltoy-idea-plugin
  • sqltoy 脚手架项目:https://github.com/CoCoTeaNet/sra-admin
  • sqltoy lambda 项目: https://gitee.com/gzghde/sqltoy-plus

更新内容 

1、增加@secure-loop 和 @secure-loop-full 非注入循环

//secure-loop自动去除循环中的null记录,secure-loop-full则不去除null记录
selet * from table t1
where 1=1 #[(@secure-loop(:nameList ,' t1.name like :nameList[i] ',' or '))]

2、增加修改指定字段的功能

lightDao.update().updateFields(field1,field2).one(entitiy);
lightDao.update().updateFields(field1,field2).many(entities);

3、增加了对sql中参数进行sql注入校验功能

<sql id="show_case">
<filters>
<!-- 一般针对@loop(:paramList)、@value(:paramName) 中涉及到的参数进行sql注入校验:
level分3种:
STRICT_WORD 数字字符下划线;
RELAXED_WORD:宽松形式的单词(允许点号、@、#、中文等非危险性符号);
SQL_KEYWORD sql关键词(select\drop\limit\delete\sleep\group by\order by\ or/and x=x 等)-->
<valid-sqlInjection params="productIds" level="STRICT_WORD"/>
</filters>
</sql>
  • sqltoy 的对比 mybatis (plus) 的核心点:查询语句编写、可阅读性、可维护性

  • 对象化 crud 是基础,但 sqltoy 有针对性的改进:update、updateSaveFetch、updateFetch 等

  • sqltoy 的缓存翻译,大幅减少表关联简化 sql,让你的查询性能成几何级提升

阐述sqltoy为什么秒杀mybatis(plus)

  • 极致的分页,同样帮助你实现查询的性能大幅提升
  1. 快速分页:@fast () 实现先取单页数据然后再关联查询,极大提升速度
  2. 分页优化器:page-optimize 让分页查询由两次变成 1.3~1.5 次 (用缓存实现相同查询条件的总记录数量在一定周期内无需重复查询
  3. sqltoy 的分页取总记录的过程不是简单的 select count (1) from (原始 sql);而是智能判断是否变成:select count (1) from 'from 后语句 ', 并自动剔除最外层的 order by
  4. sqltoy 支持并行查询:parallel="true",同时查询总记录数和单页数据,大幅提升性能
阐述sqltoy为什么秒杀mybatis(plus)  
  • 便利的跨数据库统计计算:数据旋转
阐述sqltoy为什么秒杀mybatis(plus)
  • 便利的跨数据库统计计算:无限极分组统计 (含汇总求平均)
阐述sqltoy为什么秒杀mybatis(plus)
  • 便利的跨数据库统计计算:同比环比
阐述sqltoy为什么秒杀mybatis(plus) 5、树形表排序汇总

6、扩展集成


相關推薦

2025-05-08

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装): https://github.com/imyuyu/sqltoy-idea-plugin sqltoy 脚手架项目:https://github.com/CoCoTeaNet/sra-admi

2025-04-12

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装): https://github.com/imyuyu/sqltoy-idea-plugin sqltoy 脚手架项目:https://github.com/CoCoTeaNet/sra-admi

2024-09-21

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装): https://github.com/imyuyu/sqltoy-idea-plugin sqltoy 脚手架项目:https://gitee.com/momoljw/sss-rbac-adm

2024-09-27

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装): https://github.com/imyuyu/sqltoy-idea-plugin sqltoy 脚手架项目:https://gitee.com/momoljw/sss-rbac-adm

2023-01-04

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装):  https://github.com/threefish/sqltoy-idea-plugins 更新内容 1、优化雪花算法主键策略单

2023-11-08

算默认值设置 2、优化分页总记录数的逻辑(5.2.75版本) sqltoy-orm 是 JPA 和超强查询的融合体 JPA 部分 类似 JPA 的对象化 CRUD、对象级联加载和新增、更新 强化 update 操作,提供弹性字段修改能力,不同于 hibernate 先 load 后修改

2023-11-18

数支持枚举类型,如@ loop 3、sql日志输出支持枚举类型 sqltoy-orm 是 JPA 和超强查询的融合体 JPA 部分 类似 JPA 的对象化 CRUD、对象级联加载和新增、更新 强化 update 操作,提供弹性字段修改能力,不同于 hibernate 先 load 后修改

2023-01-14

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装):  https://github.com/threefish/sqltoy-idea-plugins 更新内容 1、优化并行分页,使用统一

2023-10-28

缓存中总记录为0时可重新查询获取count 感谢@郁晨 反馈 sqltoy-orm 是 JPA 和超强查询的融合体 JPA 部分 类似 JPA 的对象化 CRUD、对象级联加载和新增、更新 强化 update 操作,提供弹性字段修改能力,不同于 hibernate 先 load 后修

2023-09-14

多元共进|2023 Google 开发者大会精彩演讲回顾 开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装):  https://github.com/threefish/sqltoy-idea

2023-01-31

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装):  https://github.com/threefish/sqltoy-idea-plugins 更新内容 1、优化反向缓存匹配获取精

2023-06-30

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装):  https://github.com/threefish/sqltoy-idea-plugins 更新内容 1、全面开放xml中的功能在find

2023-11-25

接进sql,否则当一个动态条件参数值pst.setString(index,inArg) sqltoy-orm 是 JPA 和超强查询的融合体 JPA 部分 类似 JPA 的对象化 CRUD、对象级联加载和新增、更新 强化 update 操作,提供弹性字段修改能力,不同于 hibernate 先 load 后修

2023-07-12

开源地址: github: https://github.com/sagframe/sagacity-sqltoy gitee: https://gitee.com/sagacity/sagacity-sqltoy idea 插件 (可直接在 idea 中检索安装):  https://github.com/threefish/sqltoy-idea-plugins sqltoy脚手架项目:https://gitee.com/momoljw/sss