例如,查email为空的用户信息.
Condition condition10=BeeFactoryHelper.getCondition();
condition10.op("email", Op.eq, null);
List<TestUser> list10 = suid.select(new TestUser(), condition10);
//转成的sql为:
select id,email,last_name,name,password,username,createtime from test_user where email is null
可以看到: where email is null
另外,
//where email is not null
//where email is not null
Condition condition11 = BeeFactoryHelper.getCondition();
condition11.op("email", Op.nq, null);
// condition11.op("email", Op.notEqual, null);
List<TestUser> list11 = suid.select(new TestUser(), condition11);
Printer.printList(list11);
ORM Bee更多资料:
1.快速开始
2. FAQ 常见问题
3. 综合应用 (与SpringMVC, Spring boot结合实例, 连接池等)
到源码官网
bee: 互联网新时代的Java ORM工具,简单、高效,开发速度快!
GitHub - automvc/bee: Bee is an AI, easy and high efficiency ORM framework.