public class Where extends Object
| 构造器和说明 |
|---|
Where(NamedTable namedTable) |
Where(NamedTable namedTable,
boolean needWhere) |
| 限定符和类型 | 方法和说明 |
|---|---|
Where |
and() |
Where |
and(boolean condition,
Function<Object[],Where> function) |
Where |
and(Function<Object[],Where> function) |
Where |
clone() |
int |
count(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
int |
delete(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
Where |
eq(boolean condition,
String column,
Object value) |
Where |
eq(String column,
Object value) |
boolean |
exists(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
Where |
groupBy(String... columns) |
Where |
gt(boolean condition,
String column,
Object value) |
Where |
gt(String column,
Object value) |
Where |
gte(boolean condition,
String column,
Object value) |
Where |
gte(String column,
Object value) |
Where |
in(boolean condition,
String column,
Object value) |
Where |
in(String column,
Object value) |
Object |
insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
Object |
insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext,
Map<String,Object> data) |
Where |
isNotNull(boolean condition,
String column) |
Where |
isNotNull(String column) |
Where |
isNull(boolean condition,
String column) |
Where |
isNull(String column) |
Where |
like(boolean condition,
String column,
Object value) |
Where |
like(String column,
Object value) |
Where |
lt(boolean condition,
String column,
Object value) |
Where |
lt(String column,
Object value) |
Where |
lte(boolean condition,
String column,
Object value) |
Where |
lte(String column,
Object value) |
Where |
ne(boolean condition,
String column,
Object value) |
Where |
ne(String column,
Object value) |
Where |
notBlank() |
Where |
notBlank(boolean flag) |
Where |
notIn(boolean condition,
String column,
Object value) |
Where |
notIn(String column,
Object value) |
Where |
notLike(boolean condition,
String column,
Object value) |
Where |
notLike(String column,
Object value) |
Where |
notNull() |
Where |
notNull(boolean flag) |
Where |
or() |
Where |
orderBy(String column) |
Where |
orderBy(String column,
String sort) |
Where |
orderByDesc(String column) |
Object |
page(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
Object |
page(org.ssssssss.script.runtime.RuntimeContext runtimeContext,
long limit,
long offset) |
Object |
save(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
Object |
save(org.ssssssss.script.runtime.RuntimeContext runtimeContext,
boolean beforeQuery) |
Object |
save(org.ssssssss.script.runtime.RuntimeContext runtimeContext,
Map<String,Object> data) |
Object |
save(org.ssssssss.script.runtime.RuntimeContext runtimeContext,
Map<String,Object> data,
boolean beforeQuery) |
List<Map<String,Object>> |
select(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
Map<String,Object> |
selectOne(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
int |
update(org.ssssssss.script.runtime.RuntimeContext runtimeContext) |
int |
update(org.ssssssss.script.runtime.RuntimeContext runtimeContext,
Map<String,Object> data) |
int |
update(org.ssssssss.script.runtime.RuntimeContext runtimeContext,
Map<String,Object> data,
boolean isUpdateBlank) |
public Where(NamedTable namedTable)
public Where(NamedTable namedTable, boolean needWhere)
@Comment(value="\u8fc7\u6ee4`null`\u7684\u53c2\u6570") public Where notNull()
@Comment(value="\u8fc7\u6ee4`blank`\u7684\u53c2\u6570") public Where notBlank()
@Comment(value="\u662f\u5426\u8fc7\u6ee4`null`\u7684\u53c2\u6570") public Where notNull(boolean flag)
@Comment(value="\u662f\u5426\u8fc7\u6ee4`blank`\u7684\u53c2\u6570") public Where notBlank(boolean flag)
@Comment(value="\u7b49\u4e8e`=`,\u5982\uff1a`eq(\'name\', \'\u8001\u738b\') ---> name = \'\u8001\u738b\'`") public Where eq(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="\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)
@Comment(value="\u4e0d\u7b49\u4e8e`<>`,\u5982\uff1a`ne(\'name\', \'\u8001\u738b\') ---> name <> \'\u8001\u738b\'`") public Where ne(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="\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)
@Comment(value="\u5c0f\u4e8e`<`,\u5982\uff1a`lt(\'age\', 18) ---> age < 18") public Where lt(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="\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)
@Comment(value="\u5c0f\u4e8e\u7b49\u4e8e`<=`,\u5982\uff1a`lte(\'age\', 18) ---> age <= 18") public Where lte(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="\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)
@Comment(value="\u5927\u4e8e`>`,\u5982\uff1a`get(\'age\', 18) ---> age > 18") public Where gt(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="\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)
@Comment(value="\u5927\u4e8e\u7b49\u4e8e`>=`,\u5982\uff1a`get(\'age\', 18) ---> age >= 18") public Where gte(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="\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)
@Comment(value="`in`,\u5982\uff1a`in(\'age\', [1,2,3]) ---> age in (1,2,3)") public Where in(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="`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)
@Comment(value="`not in`,\u5982\uff1a`notIn(\'age\', [1,2,3]) ---> age not in (1,2,3)") public Where notIn(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="`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)
@Comment(value="`like`,\u5982\uff1a`like(\'name\', \'%\u738b%\') ---> name like \'%\u738b%\'") public Where like(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="`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)
@Comment(value="`not like`,\u5982\uff1a`notLike(\'name\', \'%\u738b%\') ---> name not like \'%\u738b%\'") public Where notLike(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column, @Comment(name="value",value="\u503c") Object value)
@Comment(value="`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)
@Comment(value="`is null`,\u5982\uff1a`isNull(\'name\') ---> name is null") public Where isNull(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column)
@Comment(value="`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)
@Comment(value="`is not null`,\u5982\uff1a`isNotNull(\'name\') ---> name is not null") public Where isNotNull(@Comment(name="column",value="\u6570\u636e\u5e93\u4e2d\u7684\u5217\u540d") String column)
@Comment(value="`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)
@Comment(value="\u62fc\u63a5`or`") public Where or()
@Comment(value="\u62fc\u63a5`and`") public Where and()
@Comment(value="`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="function",value="\u56de\u8c03\u51fd\u6570") Function<Object[],Where> function)
@Comment(value="`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)
@Comment(value="\u62fc\u63a5`order by xxx asc/desc`") public Where orderBy(@Comment(name="column",value="\u8981\u6392\u5e8f\u7684\u5217") String column, @Comment(name="sort",value="`asc`\u6216`desc`") String sort)
@Comment(value="\u62fc\u63a5`order by xxx asc`") public Where orderBy(@Comment(name="column",value="\u8981\u6392\u5e8f\u7684\u5217") String column)
@Comment(value="\u62fc\u63a5`order by xxx desc`") public Where orderByDesc(@Comment(name="column",value="\u8981\u6392\u5e8f\u7684\u5217") String column)
@Comment(value="\u62fc\u63a5`group by`") public Where groupBy(@Comment(value="\u8981\u5206\u7ec4\u7684\u5217") String... columns)
@Comment(value="\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(value="\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)
@Comment(value="\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(value="\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)
@Comment(value="\u6267\u884c\u63d2\u5165\u8bed\u53e5\uff0c\u8fd4\u56de\u4e3b\u952e") public Object insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
@Comment(value="\u6267\u884c\u63d2\u5165\u8bed\u53e5\uff0c\u8fd4\u56de\u4e3b\u952e") public Object insert(org.ssssssss.script.runtime.RuntimeContext runtimeContext, @Comment(name="data",value="\u5404\u9879\u5217\u548c\u503c") Map<String,Object> data)
@Comment(value="\u6267\u884cupdate\u8bed\u53e5") public int update(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
@Comment(value="\u6267\u884cdelete\u8bed\u53e5") public int delete(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
@Comment(value="\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(value="\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)
@Comment(value="\u6267\u884c\u5206\u9875\u67e5\u8be2") public Object page(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
@Comment(value="\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)
@Comment(value="\u6267\u884cselect\u67e5\u8be2") public List<Map<String,Object>> select(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
@Comment(value="\u6267\u884cselectOne\u67e5\u8be2") public Map<String,Object> selectOne(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
@Comment(value="\u67e5\u8be2\u6761\u6570") public int count(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
@Comment(value="\u67e5\u8be2\u662f\u5426\u5b58\u5728") public boolean exists(org.ssssssss.script.runtime.RuntimeContext runtimeContext)
Copyright © 2020–2021. All rights reserved.