BeetlSQL 3.20.0 发布,流行 Java ORM 工具


阳康后继续开源,本次发布建议更新

  • I6B7AN 修复注解@InheritMapper 解析映射目标为Object的BUG
    public static interfaceCommonMapper<T> extends BaseMapper{
    @InheritMapper
    public List<T> implementByChild(T t);
    }
    
    @SqlResource("user")
    public static interfaceMyTestUserMapper extends CommonMapper<User>{
    	//implementByChild 的映射对象是User, 查找文件是user.md中的implementByChild 
    }
    
    @SqlResource("admin")
    public static interfaceMyTestAdminUserMapper extends CommonMapper<AdminUser>{
    	//implementByChild 的映射对象是AdminUser,查找文件是admin.md中的implementByChild 
    }

     

  • I6AWTZ 修复2022年10更新版本导致beetlsql多种数据库库支持的BUG

  • I634BU Spring Boot Starter 打包去掉对commons-dbcp 依赖

 

  • I617VE 修复@ResultProvider(AutoJsonMapper.class)注解与自定义AttributeConvert注解冲突
    @Data
    @ResultProvider(AutoJsonMapper.class) // 自动根据结果集映射到Bean
    public static class MyUserView2 {
    Integer id;
    @Coder //自定义注解
    String name;
    DepartmentEntity dept;
    }

     

  • I5ZWFO  Stream 接口 对Lambda的支持
     

    streamData = sqlManager.lambdaQuery(UserEntity.class).andEq(UserEntity::getRole,1).stream();
    streamData.foreach(user -> {
    	System.out.println(user.getName());
    });

     

  •  

    I63SGJ  修复当用户自定义分表逻辑抛异常时候,BeetlSQL提示有误的BUG
     

    @Table(name="${toShardTable('user')}") //如果toShardTable逻辑错误,抛出异常能正常显示错误逻辑
    public class UserEntity{
    }

     

 

  • maven

    <dependency>
    <groupId>com.ibeetl</groupId>
    <artifactId>beetlsql</artifactId>
    <version>3.20.0-RELEASE</version>
    </dependency>


    BeetlSQL 自主研发自 2015 年,目标是提供开发高效,维护高效,运行高效的数据访问框架,它适用范围广,定制性强,写起数据库访问代码特别顺滑,不亚于 MyBatis。你不想写 SQL 也好,或者想更好地写 SQL 也好,BeetlSQL 都能满足这要求,目前支持的数据库如下
     

  • 传统数据库:MySQL (包括支持 MySQL 协议的各种数据库), MariaDB ,Oralce ,Postgres (包括支持 Postgres 协议的各种数据库), DB2 , SQL Server ,H2 , SQLite , Derby ,神通,达梦,华为高斯,人大金仓,PolarDB,GBase8s,GreatSQL 等
  • 大数据:HBase,ClickHouse,Cassandar,Hive,GreenPlum
  • 物联网时序数据库:Machbase,TD-Engine,IotDB
  • SQL 查询引擎:Drill,Presto,Druid
  • 内存数据库:ignite,CouchBase


    如下测试包含了常用的 orm 操作: 多表联合查询映射(complexMapping),直接执行 sql (executeJdbc), 执行模板 sql (executeTemplate), 执行文件中的模板 sql ( File), 内置插入(insert),Query 调用链 (Query), 翻页查询 (pageQuery), 内置主键查询 (selectById), one2Many 自动关联查询 
  • Benchmark ModeCntScore Error Units
    JMHMain.beetlsqlComplexMapping thrpt5177.412 ±59.295ops/ms
    JMHMain.beetlsqlExecuteJdbcthrpt5365.386 ± 131.116ops/ms
    JMHMain.beetlsqlExecuteTemplatethrpt5313.983 ± 109.348ops/ms
    JMHMain.beetlsqlFile thrpt5343.331 ± 138.322ops/ms
    JMHMain.beetlsqlInsert thrpt5196.150 ±87.106ops/ms
    JMHMain.beetlsqlLambdaQuerythrpt5219.579 ±88.081ops/ms
    JMHMain.beetlsqlOne2Many thrpt5 93.343 ±37.242ops/ms
    JMHMain.beetlsqlPageQuerythrpt5161.726 ±76.978ops/ms
    JMHMain.beetlsqlSelectById thrpt5302.450 ±95.770ops/ms
    JMHMain.jdbcExecuteJdbcthrpt5782.097 ± 252.305ops/ms
    JMHMain.jdbcInsert thrpt5273.364 ± 133.523ops/ms
    JMHMain.jdbcSelectById thrpt5806.214 ± 261.218ops/ms
    JMHMain.jpaExecuteJdbc thrpt5107.990 ±50.917ops/ms
    JMHMain.jpaExecuteTemplate thrpt5122.694 ±46.344ops/ms
    JMHMain.jpaInsertthrpt5 71.806 ±37.828ops/ms
    JMHMain.jpaOne2Manythrpt5 88.506 ±36.018ops/ms
    JMHMain.jpaPageQuery thrpt5110.377 ±35.236ops/ms
    JMHMain.jpaSelectByIdthrpt5260.832 ±68.198ops/ms
    JMHMain.mybatisComplexMappingthrpt5 86.302 ±48.819ops/ms
    JMHMain.mybatisExecuteTemplate thrpt5177.863 ±63.760ops/ms
    JMHMain.mybatisFilethrpt5143.007 ±69.036ops/ms
    JMHMain.mybatisInsertthrpt5122.391 ±45.541ops/ms
    JMHMain.mybatisLambdaQuery thrpt59.109 ± 5.487ops/ms
    JMHMain.mybatisPageQuery thrpt5 58.990 ±16.252ops/ms
    JMHMain.mybatisSelectByIdthrpt5184.545 ±60.096ops/ms
    JMHMain.weedExecuteJdbcthrpt5311.293 ± 161.801ops/ms
    JMHMain.weedExecuteTemplatethrpt5328.432 ± 106.103ops/ms
    JMHMain.weedFile thrpt5338.572 ± 168.666ops/ms
    JMHMain.weedInsert thrpt5183.079 ± 101.693ops/ms
    JMHMain.weedLambdaQuerythrpt5293.843 ± 155.029ops/ms
    JMHMain.weedPageQuerythrpt5176.761 ±88.406ops/ms
    JMHMain.weedSelectById thrpt5295.524 ± 147.727ops/ms

     

    阅读文档 源码和例子 在线体验 多库使用 性能测试


相關推薦

2022-07-06

dependency> <groupId>com.ibeetl</groupId> <artifactId>beetlsql</artifactId> <version>3.15.0-RELEASE</version> </dependency>       BeetlSQL 自主研发自 2015 年,目标是提供开发高效,维护高效,运行高效的数据

2022-11-01

dependency> <groupId>com.ibeetl</groupId> <artifactId>beetlsql</artifactId> <version>3.19.3-RELEASE</version> </dependency> BeetlSQL 自主研发自 2015 年,目标是提供开发高效,维护高效,运行高效的数据访问框架,它适用范

2023-03-13

dependency> <groupId>com.ibeetl</groupId> <artifactId>beetlsql</artifactId> <version>3.20.4-RELEASE</version> </dependency> BeetlSQL 自主研发自 2015 年,目标是提供开发高效,维护高效,运行高效的数据访问框架,它适用范

2024-03-01

其增强组件 [ ] jpa [ ] easy-query [ ] wood [ ] sqltoy [ ] beetlsql [ ] ...... 有想扩展其他orm框架和数据库的可加qq群联系群主 代码示例 以下测试代码请详见hh-vue项目中的hh-vue/hh-admin/src/test/java/com/hh/test/service/impl/FlowTest.java

2023-08-05

调整SqlIdFactory实现,使用类全路径名作为sqlId标识 调整BeetlSQL+SpringBoot集成方式,支持SpringBoot3 新增MyBatis-Flex,EasyQuery  俩款ORM工具性能测试 maven <dependency> <groupId>com.ibeetl</groupId> <artifactId>beetlsql</art

2024-03-23

其增强组件 [ ] jpa [ ] easy-query [ ] wood [ ] sqltoy [ ] beetlsql [ ] ...... 有想扩展其他orm框架和数据库的可加qq群联系群主 代码示例 https://gitee.com/min290/hh-vue/blob/master/ruoyi-admin/src/test/java/com/ruoyi/system/service/impl/FlowTest.java 部

2023-07-06

dependency> <groupId>com.ibeetl</groupId> <artifactId>beetlsql</artifactId> <version>3.23.4-RELEASE</version> </dependency>   BeetlSQL 自主研发自 2015 年,目标是提供开发高效,维护高效,运行高效的数据访问框架,它

2023-04-03

ML标签支持)。 <?xml version="1.0" encoding="UTF-8" ?> <beetlsql> <sql id="testIf"> select * from sys_user where 1=1 <if test="name!=null"> and name != #{name} </if> </sql> <sql id="testIsNotEmpty"> select * from sys_user where 1=1

2023-03-17

  Mybatis Plus      JPA   TK Mybatis   BeetlSQL  

2024-02-08

兼容 MyBatis) LambdaTemplate (高度接近 MyBatis Plus、jOOQ 和 BeetlSQL) @Insert、@Update、@Delete、@Query、@Callable 注解(类似 JPA) 事务支持 支持 5 个事务隔离级别、7 个事务传播行为(与 Spring tx 相同) 提供 TransactionTemplate、Tr

2023-04-23

godb=true application.yml 也是支持的.   Bee V2.1.x 往期发布: https://www.oschina.net/news/235501/bee-2-1-4-5-released https://www.oschina.net/news/226875/bee-2-1-2-1-released https://www.oschina.net/news/230490/bee-2-1-2-28-released https://www.oschina.net/news/231902/javao

2023-05-12

直接支持运行 Mongodb 原生语句     Bee V2.1.x 往期发布: https://www.oschina.net/news/235501/bee-2-1-4-5-released https://www.oschina.net/news/226875/bee-2-1-2-1-released https://www.oschina.net/news/230490/bee-2-1-2-28-released https://www.oschina.net/news/231902/javao

2023-04-06

支持Mongodb创建索引 25)支持Mongodb事务   Bee V2.1.x 往期发布: https://www.oschina.net/news/226875/bee-2-1-2-1-released https://www.oschina.net/news/230490/bee-2-1-2-28-released https://www.oschina.net/news/231902/javaorm-bee-2-1-3-6 https://www.oschina.net/news/232911/bee-sp

2022-09-21

、Mybatis Plus    2、JPA    3、 TK Mybatis 4、BeetlSQL 组件介绍: 表里我们经常存放字典码,外键 。给前端展示的时候要展示字典描述 (比如 sex 0 代表男),外键要显示 title/name (如 userid 1 要翻译为张三)。字典比较简