内容简介:Bee,互联网新时代的Java ORM工具,简单、高效,开发速度快! V1.9.8.10.1(2021国庆节版) 复杂条件查询自动化,最大限度降低后端编码,复杂条件后端编码可以解放了 如:范围查询betweet, not betweet, 模糊查询,l...
Bee,互联网新时代的Java ORM工具,简单、高效,开发速度快!
V1.9.8.10.1(2021国庆节版)
复杂条件查询自动化,最大限度降低后端编码,复杂条件后端编码可以解放了
如:范围查询betweet, not betweet,
模糊查询,like, not like, letf like ,right,
in, not in,
max,min, avg, sum, count,,distinct,
=, >,<, >=,<=,!=,
等等
通过以下例子,可以发现,拼装复杂查询条件的代码,不见了。
实例:
前端js Search查询Json:
[{
"field": "id",
"op": "between",
"value1": 100023,
"value2": 100025
}]
后端(SpringMVC+ Bee)
可以发现,拼装复杂查询条件的代码,不见了。
@RequestMapping("/testArray")
public Result list(@RequestBody Search search[]) {
Result result = new Result();
try {
if (search==null) {
result.setErrorMsg("参数为空!");
return result;
}
Condition condition=SearchProcessor.parseSearch(search);
List<Users> list17 = suidRich.select(new Users(), condition);
for (int i = 0; i < list17.size(); i++) {
Logger.info(list17.get(i).toString());
}
} catch (BeeSQLException e) {
result.setErrorMsg(e.getMessage());
}
return result;
}
日志:
[INFO] [Bee] select SQL: ( ExecutableSql )
select id,userid,username,regtime,regtype from users where id between '100023' and '100025'
[INFO] [Bee] | <-- select rows: 3
数据库对应数据:

-------------------------------------------------
Bee 是一个简单,易用,功能强大,开发速度快,编码少的 JAVA ORM 框架。连接,事务都可以由Bee框架负责管理. Bee 简化了与DB交互的编码工作量, 是 编码复杂度 为 O(1) 的 Java 框架!
Bee简单易用:单表操作、多表关联操作,可以不用写sql,极少语句就可以完成 SQL 操作;概念简单,10分钟即可入门。
Bee功能强大:复杂查询也支持向对象方式,分页查询性能更高,一级缓存即可支持个性化优化;具有分布式特性。高级要求,还可以方便自定义SQL语句。
码云上的项目首页:
https://gitee.com/automvc/bee-springboot
github:
https://github.com/automvc/bee
相关框架设计信息也可关注微信公众号:软件设计活跃区
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Masterminds of Programming
Federico Biancuzzi、Chromatic / O'Reilly Media / 2009-03-27 / USD 39.99
Description Masterminds of Programming features exclusive interviews with the creators of several historic and highly influential programming languages. Think along with Adin D. Falkoff (APL), Jame......一起来看看 《Masterminds of Programming》 这本书的介绍吧!
