类 Where
java.lang.Object
org.ssssssss.magicapi.modules.db.table.Where
单表API的Where
- 作者:
- mxd
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明and()private WherevoidvoidvoidvoidappendOr()clone()intcount(org.ssssssss.script.runtime.RuntimeContext runtimeContext) intdelete(org.ssssssss.script.runtime.RuntimeContext runtimeContext) booleanexists(org.ssssssss.script.runtime.RuntimeContext runtimeContext) (专用程序包) booleanfilterNullAndBlank(Object value) (专用程序包) StringgetSql()insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext) (专用程序包) booleanisEmpty()notBlank()notBlank(boolean flag) notNull()notNull(boolean flag) or()orderByDesc(String column) page(org.ssssssss.script.runtime.RuntimeContext runtimeContext) page(org.ssssssss.script.runtime.RuntimeContext runtimeContext, long limit, long offset) (专用程序包) voidremove()save(org.ssssssss.script.runtime.RuntimeContext runtimeContext) save(org.ssssssss.script.runtime.RuntimeContext runtimeContext, boolean beforeQuery) save(org.ssssssss.script.runtime.RuntimeContext runtimeContext, Map<String, Object> data, boolean beforeQuery) select(org.ssssssss.script.runtime.RuntimeContext runtimeContext) selectOne(org.ssssssss.script.runtime.RuntimeContext runtimeContext) intupdate(org.ssssssss.script.runtime.RuntimeContext runtimeContext) intintupdate(org.ssssssss.script.runtime.RuntimeContext runtimeContext, Map<String, Object> data, boolean isUpdateBlank)
-
字段详细资料
-
tokens
-
params
-
namedTable
-
needWhere
private final boolean needWhere -
notNull
private boolean notNull -
notBlank
private boolean notBlank
-
-
构造器详细资料
-
Where
-
Where
-
-
方法详细资料
-
clone
-
notNull
-
notBlank
-
notNull
-
notBlank
-
eq
-
eq
@Comment("\u7b49\u4e8e`=`,\u5982\uff1a`eq(\'name\', \'\u8001\u738b\') ---> name = \'\u8001\u738b\'`") public Where eq(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
ne
-
ne
@Comment("\u4e0d\u7b49\u4e8e`<>`,\u5982\uff1a`ne(\'name\', \'\u8001\u738b\') ---> name <> \'\u8001\u738b\'`") public Where ne(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
lt
-
lt
@Comment("\u5c0f\u4e8e`<`,\u5982\uff1a`lt(\'age\', 18) ---> age < 18") public Where lt(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
lte
-
lte
@Comment("\u5c0f\u4e8e\u7b49\u4e8e`<=`,\u5982\uff1a`lte(\'age\', 18) ---> age <= 18") public Where lte(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
gt
-
gt
@Comment("\u5927\u4e8e`>`,\u5982\uff1a`get(\'age\', 18) ---> age > 18") public Where gt(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
gte
-
gte
@Comment("\u5927\u4e8e\u7b49\u4e8e`>=`,\u5982\uff1a`get(\'age\', 18) ---> age >= 18") public Where gte(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
in
-
in
@Comment("`in`,\u5982\uff1a`in(\'age\', [1,2,3]) ---> age in (1,2,3)") public Where in(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
notIn
-
notIn
@Comment("`not in`,\u5982\uff1a`notIn(\'age\', [1,2,3]) ---> age not in (1,2,3)") public Where notIn(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
like
-
like
@Comment("`like`,\u5982\uff1a`like(\'name\', \'%\u738b%\') ---> name like \'%\u738b%\'") public Where like(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
notLike
-
notLike
@Comment("`not like` ,\u5982\uff1a`notLike(\'name\', \'%\u738b%\') ---> name not like \'%\u738b%\'") public Where notLike(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value) -
isNull
-
isNull
@Comment("`is null`,\u5982\uff1a`isNull(\'name\') ---> name is null") public Where isNull(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column) -
isNotNull
-
isNotNull
@Comment("`is not null`,\u5982\uff1a`isNotNull(\'name\') ---> name is not null") public Where isNotNull(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column) -
or
-
and
-
and
-
and
@Comment("`and`\u5d4c\u5957\uff0c\u5982and(it => it.eq(\'name\',\'\u674e\u767d\').ne(\'status\',\'\u6b63\u5e38\') --> and (name = \'\u674e\u767d\' and status <> \'\u6b63\u5e38\')") public Where and(@Comment(name="condition",value="\u5224\u65ad\u8868\u8fbe\u5f0f\uff0c\u5f53\u4e3atrue\u65f6\u62fc\u63a5\u6761\u4ef6") boolean condition, @Comment(name="function",value="\u56de\u8c03\u51fd\u6570") Function<Object[], Where> function) -
orderBy
-
orderBy
-
orderByDesc
-
groupBy
-
save
@Comment("\u4fdd\u5b58\u5230\u8868\u4e2d\uff0c\u5f53\u4e3b\u952e\u6709\u503c\u65f6\u5219\u4fee\u6539\uff0c\u5426\u5219\u63d2\u5165") public Object save(org.ssssssss.script.runtime.RuntimeContext runtimeContext) -
save
@Comment("\u4fdd\u5b58\u5230\u8868\u4e2d\uff0c\u5f53\u4e3b\u952e\u6709\u503c\u65f6\u5219\u4fee\u6539\uff0c\u5426\u5219\u63d2\u5165") public Object save(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="beforeQuery",value="\u662f\u5426\u6839\u636eid\u67e5\u8be2\u6709\u6ca1\u6709\u6570\u636e") boolean beforeQuery) -
save
-
save
@Comment("\u4fdd\u5b58\u5230\u8868\u4e2d\uff0c\u5f53\u4e3b\u952e\u6709\u503c\u65f6\u5219\u4fee\u6539\uff0c\u5426\u5219\u63d2\u5165") public Object save(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String, Object> data, @Comment(name="beforeQuery",value="\u662f\u5426\u6839\u636eid\u67e5\u8be2\u6709\u6ca1\u6709\u6570\u636e") boolean beforeQuery) -
insert
@Comment("\u6267\u884c\u63d2\u5165\u8bed\u53e5\uff0c\u8fd4\u56de\u4e3b\u952e") public Object insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext) -
insert
-
update
@Comment("\u6267\u884cupdate\u8bed\u53e5") public int update(org.ssssssss.script.runtime.RuntimeContext runtimeContext) -
delete
@Comment("\u6267\u884cdelete\u8bed\u53e5") public int delete(org.ssssssss.script.runtime.RuntimeContext runtimeContext) -
update
-
update
@Comment("\u6267\u884cupdate\u8bed\u53e5") public int update(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String, Object> data, @Comment(name="isUpdateBlank",value="\u662f\u5426\u66f4\u65b0\u7a7a\u503c\u5b57\u6bb5") boolean isUpdateBlank) -
page
@Comment("\u6267\u884c\u5206\u9875\u67e5\u8be2") public Object page(org.ssssssss.script.runtime.RuntimeContext runtimeContext) -
page
@Comment("\u6267\u884c\u5206\u9875\u67e5\u8be2\uff0c\u5206\u9875\u6761\u4ef6\u624b\u52a8\u4f20\u5165") public Object page(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="limit",value="\u9650\u5236\u6761\u6570") long limit, @Comment(name="offset",value="\u8df3\u8fc7\u6761\u6570") long offset) -
select
-
selectOne
-
count
@Comment("\u67e5\u8be2\u6761\u6570") public int count(org.ssssssss.script.runtime.RuntimeContext runtimeContext) -
exists
@Comment("\u67e5\u8be2\u662f\u5426\u5b58\u5728") public boolean exists(org.ssssssss.script.runtime.RuntimeContext runtimeContext) -
appendAnd
public void appendAnd() -
appendOr
public void appendOr() -
getParams
-
remove
void remove() -
isEmpty
boolean isEmpty() -
append
-
append
-
getSql
String getSql() -
filterNullAndBlank
-
append
-