public abstract class WhereBase<T extends WhereBase> extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected SQLBuilder |
_builder |
protected DbContext |
_context |
protected StringBuilder |
_orderBy |
| 限定符和类型 | 方法和说明 |
|---|---|
T |
and()
添加SQL and 关键字
|
T |
and(String code,
Object... args)
添加SQL and 语句 //可使用?
|
T |
andBtw(String column,
Object start,
Object end)
添加SQL where between 语句
|
T |
andByAsc(String fileds) |
T |
andByDesc(String fileds) |
T |
andEq(String column,
Object val)
添加SQL and = 语句
|
T |
andGt(String column,
Object val)
添加SQL and > 语句
|
T |
andGte(String column,
Object val)
添加SQL and >= 语句
|
T |
andIf(boolean condition,
String code,
Object... args) |
T |
andIn(String column,
Iterable ary)
添加SQL and in(?...)
|
T |
andLk(String column,
String val)
添加SQL and like 语句
|
T |
andLt(String column,
Object val)
添加SQL and < 语句
|
T |
andLte(String column,
Object val)
添加SQL and <= 语句
|
T |
andNbtw(String column,
Object start,
Object end)
添加SQL where note between 语句
|
T |
andNeq(String column,
Object val) |
T |
andNin(String column,
Iterable ary)
添加SQL and not in(?...)
|
T |
andNlk(String column,
String val)
添加SQL and not like 语句
|
T |
begin()
添加左括号
|
T |
begin(String code,
Object... args)
添加左括号并附加代码
可使用?
|
T |
beginBtw(String column,
Object start,
Object end)
添加SQL ( between 语句
|
T |
beginEq(String column,
Object val)
添加SQL ( = 语句
|
T |
beginGt(String column,
Object val)
添加SQL ( > 语句
|
T |
beginGte(String column,
Object val)
添加SQL ( >= 语句
|
T |
beginIn(String column,
Iterable ary)
添加SQL ( in(?...)
|
T |
beginLk(String column,
String val)
添加SQL ( like 语句
|
T |
beginLt(String column,
Object val)
添加SQL ( < 语句
|
T |
beginLte(String column,
Object val)
添加SQL ( <= 语句
|
T |
beginNbtw(String column,
Object start,
Object end)
添加SQL ( not between 语句
|
T |
beginNeq(String column,
Object val) |
T |
beginNin(String column,
Iterable ary)
添加SQL ( not in(?...)
|
T |
beginNlk(String column,
String val)
添加SQL ( not like 语句
|
protected DbType |
dbType() |
T |
end()
添加右括号
|
protected String |
fmtColumn(String name) |
protected String |
fmtCondition(String condition) |
protected String |
fmtMutColumns(String columns) |
protected String |
fmtObject(String name) |
protected String |
fmtSchema(String name) |
T |
groupBy(String code) |
T |
having(String code) |
T |
or()
添加SQL or 关键字
|
T |
or(String code,
Object... args)
添加SQL or 语句 //可使用?
|
T |
orBtw(String column,
Object start,
Object end)
添加SQL where between 语句
|
T |
orderBy(String code) |
T |
orderByAsc(String fileds) |
T |
orderByDesc(String fileds) |
protected T |
orderByDo(String code) |
T |
orEq(String column,
Object val)
添加SQL or = 语句
|
T |
orGt(String column,
Object val)
添加SQL or > 语句
|
T |
orGte(String column,
Object val)
添加SQL or >= 语句
|
T |
orIf(boolean condition,
String code,
Object... args) |
T |
orIn(String column,
Iterable ary)
添加SQL or in(?...)
|
T |
orLk(String column,
String val)
添加SQL or like 语句
|
T |
orLt(String column,
Object val)
添加SQL or < 语句
|
T |
orLte(String column,
Object val)
添加SQL or <= 语句
|
T |
orNbtw(String column,
Object start,
Object end)
添加SQL where note between 语句
|
T |
orNeq(String column,
Object val) |
T |
orNin(String column,
Iterable ary)
添加SQL or not in(?...)
|
T |
orNlk(String column,
String val)
添加SQL or not like 语句
|
T |
where()
添加SQL where 关键字
|
T |
where(MapperWhereQ whereQ) |
T |
where(String code,
Object... args)
添加SQL where 语句
可使用?
|
T |
whereBtw(String column,
Object start,
Object end)
添加SQL where between 语句
|
T |
whereEntity(Object entity) |
T |
whereEntityIf(Object entity,
Fun2<Boolean,String,Object> condition) |
T |
whereEq(String column,
Object val)
添加SQL where = 语句
例:.whereEq("name","x");
|
T |
whereGt(String column,
Object val)
添加SQL where > 语句
|
T |
whereGte(String column,
Object val)
添加SQL where >= 语句
|
T |
whereIf(boolean condition,
String code,
Object... args) |
T |
whereIn(String column,
Iterable ary)
添加SQL where in(?...)
|
T |
whereLk(String column,
String val)
添加SQL where like 语句
|
T |
whereLt(String column,
Object val)
添加SQL where < 语句
|
T |
whereLte(String column,
Object val)
添加SQL where <= 语句
|
T |
whereMap(Map<String,Object> columnMap) |
T |
whereMapIf(Map<String,Object> columnMap,
Fun2<Boolean,String,Object> condition) |
T |
whereNbtw(String column,
Object start,
Object end)
添加SQL where note between 语句
|
T |
whereNeq(String column,
Object val) |
T |
whereNin(String column,
Iterable ary)
添加SQL where not in(?...)
|
T |
whereNlk(String column,
String val)
添加SQL where not like 语句
|
T |
whereTrue() |
protected DbContext _context
protected SQLBuilder _builder
protected StringBuilder _orderBy
protected WhereBase()
public WhereBase(DbContext context)
protected DbType dbType()
public T whereTrue()
public T where(String code, Object... args)
例1: .where("name=?","x"); 例2: .where("((name=? or id=?) and sex=0)","x",1) 例3: .where("id IN (?...)",new int[]{1,12,3,6})
public T where()
public T where(MapperWhereQ whereQ)
public T and(String code, Object... args)
例1:.and("name=?","x"); 例2: .and("(name=? or id=?)","x",1)
public T and()
public T or(String code, Object... args)
public T or()
public T begin()
public T end()
Copyright © 2023. All rights reserved.