Mybatis generator 1.4.x 入门教程

 


复制代码

查询 1 isNull/isNotNull 是 2 isEqualTo/isNotEqualTo 是否等于/不等于

 3 isEqualToWhenPresent/isNotEqualToWhenPresent    当存在时是否(不)等于
 4 isGreaterThan/isGreaterThanWhenPresent    大于
 5 isGreaterThanOrEqualTo/isGreaterThanOrEqualToWhenPresent    大于等于
 6 isLessThan/isLessThanWhenPresent/    小于
 7 isLessThanOrEqualTo/isLessThanOrEqualToWhenPresent    小于等于
 8 isIn/isNotIn    in操作
 9 isInWhenPresent/isNotInWhenPresent    in操作
10 isBetween/isNotBetween    是否在区间
11 isBetweenWhenPresent/isNotBetweenWhenPresent    是否在区间
12 isLike/isNotLike    like(需要添加%)
13 isLikeWhenPresent/isNotLikeWhenPresent    like(需要添加%)
14 isTrue/isFalse    是否是true/false
15 isLikeCaseInsensitive/isLikeCaseInsensitiveWhenPresent    like(需要添加%)
16 isNotLikeCaseInsensitive/isNotLikeCaseInsensitiveWhenPresent    like(需要添加%)
17 isInCaseInsensitive/isInCaseInsensitiveWhenPresent    in操作
18 isNotInCaseInsensitive/isNotInCaseInsensitiveWhenPresent    in操作

where条件查询还有很多我就不一一例举了,我这里有一张官方偷来的表格:

 

conditionexampleresult
between where(foo, isbetween(x).and(y)) where foo between ? and ?
equals where(foo, isequalto(x)) where foo = ?
greater than where(foo, isgreaterthan(x)) where foo > ?
greater than or equals where(foo, isgreaterthanorequalto(x)) where foo >= ?
in where(foo, isin(x, y)) where foo in (?,?)
in (case insensitive) where(foo, isincaseinsensitive(x, y)) where upper(foo) in (?,?) (the framework will transform the values for x and y to upper case)
less than where(foo, islessthan(x)) where foo < ?
less than or equals where(foo, islessthanorequalto(x)) where foo <= ?
like where(foo, islike(x)) where foo like ? (the framework does not add the sql wild cards to the value - you will need to do that yourself)
like (case insensitive) where(foo, islikecaseinsensitive(x)) where upper(foo) like ? (the framework does not add the sql wild cards to the value - you will need to do that yourself, the framework will transform the value of x to upper case)
not between where(foo, isnotbetween(x).and(y)) where foo not between ? and ?
not equals where(foo, isnotequalto(x)) where foo <> ?
not in where(foo, isnotin(x, y)) where foo not in (?,?)
not in (case insensitive) where(foo, isnotincaseinsensitive(x, y)) where upper(foo) not in (?,?) (the framework will transform the values for x and y to upper case)
not like where(foo, islike(x)) where foo not like ? (the framework does not add the sql wild cards to the value - you will need to do that yourself)
not like (case insensitive) where(foo, isnotlikecaseinsensitive(x)) where upper(foo) not like ? (the framework does not add the sql wild cards to the value - you will need to do that yourself, the framework will transform the value of x to upper case)
not null where(foo, isnotnull()) where foo is not null
null where(foo, isnull()) where foo is null
 
复制代码
posted @   Tao!!  阅读(230)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek “源神”启动!「GitHub 热点速览」
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· 2 本地部署DeepSeek模型构建本地知识库+联网搜索详细步骤
点击右上角即可分享
微信分享提示

目录导航