logo

BeetlSQL 2.12.11 发布,Java Dao 工具

2019-08-29

JiangRen Mr

本次增加了一个小功能,Query提供俩个静态方法filterEmpty,filterNull,这俩个方法返回StrongValue的子类,当andEq等方法的参数是StrongValue子类的时候,将根据条件拼接SQL语句。

 Blog blog = query.andEq(Blog::getTitle, Query.filterNull(null))
                .andIn(Blog::getId, Arrays.asList(1,2,3,4,5,6,7))
                .andNotIn(Blog::getId, Query.filterEmpty(Collections.EMPTY_LIST))
                .andNotEq(Blog::getId, Query.filterEmpty(""))
                .andLess(Blog::getId, Query.filterEmpty(2))
                .andGreatEq(Blog::getId, Query.filterEmpty(0)).single()

Maven

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

BeetSql是一个全功能DAO工具, 同时具有Hibernate 优点 & Mybatis优点功能,适用于承认以SQL为中心,同时又需求工具能自动能生成大量常用的SQL的应用。

  • 无需注解,自动生成大量内置SQL,轻易完成增删改查功能

  • 数据模型支持Pojo,也支持Map/List这种快速模型,也支持混合模型

  • SQL 以更简洁的方式,Markdown方式集中管理,同时方便程序开发和数据库SQL调试。

  • SQL 模板基于Beetl实现,更容易写和调试,以及扩展

  • 内置大量SQL,内置模板查询,提供Query类等方式避免了手写SQL

  • 简单支持关系映射而不引入复杂的OR Mapping概念和技术。

  • 具备Interceptor功能,可以调试,性能诊断SQL,以及扩展其他功能

  • 内置支持主从数据库,通过扩展,可以支持更复杂的分库分表逻辑

  • 支持跨数据库平台,开发者所需工作减少到最小

性能评测,来自 https://gitee.com/xiandafu/dao-benchmark

本文章转自开源中国。

logo

Follow Us

linkedinfacebooktwitterinstagramweiboyoutubebilibilitiktokxigua

We Accept

/image/layout/pay-paypal.png/image/layout/pay-visa.png/image/layout/pay-master-card.png/image/layout/pay-airwallex.png/image/layout/pay-alipay.png

地址

Level 10b, 144 Edward Street, Brisbane CBD(Headquarter)
Level 2, 171 La Trobe St, Melbourne VIC 3000
四川省成都市武侯区桂溪街道天府大道中段500号D5东方希望天祥广场B座45A13号
Business Hub, 155 Waymouth St, Adelaide SA 5000

Disclaimer

footer-disclaimerfooter-disclaimer

JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.

匠人学院网站上的所有内容,包括课程材料、徽标和匠人学院网站上提供的信息,均受澳大利亚政府知识产权法的保护。严禁未经授权使用、销售、分发、复制或修改。违规行为可能会导致法律诉讼。通过访问我们的网站,您同意尊重我们的知识产权。 JR Academy Pty Ltd 保留所有权利,包括专利、商标和版权。任何侵权行为都将受到法律追究。查看用户协议

© 2017-2024 JR Academy Pty Ltd. All rights reserved.

ABN 26621887572