where
// select * from user where name = "boht"List<User> user = new Quser().name.equalTo("boht").findList();
and
// select * from user where name = "boht" and age > 25List<User> user = new Quser().name.equalTo("boht").age.gt(25).findList()
or
// select * from user where name = "boht" or phone = '18615632853'List<User> user = new Quser().or().name.equalTo("boht").phone.equalTo("18615632851").findList()
原始表达式*
List<User> user = QUser().or().raw("(userid = ? or phone = ?)","11696357","18561803625").findList() // 子查询 in --> select userid xxx List<User> user = QUser().or().raw("(userid in ('11696357','11696362')").findList() //
orderBy
List<User> user = QUser().userid.order().userid.desc() / asc()
select
可以在select中使用SUM, MAX, MIN, AVG and COUNT
QUser().select("p_user.userid,p_user.phone,p_user.name")
count
Quser().findCount()
exist
Quser().userid.eq("11696357").exists()
打印sql
logger.info("${query.generatedSql}")