mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
optimize QueryWrapper.java
This commit is contained in:
parent
b7fff23e8a
commit
27bf67dee0
@ -123,7 +123,6 @@ public class QueryWrapper extends BaseQueryWrapper<QueryWrapper> {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public QueryWrapper and(QueryCondition queryCondition) {
|
||||
return addWhereQueryCondition(queryCondition, SqlConnector.AND);
|
||||
}
|
||||
@ -133,17 +132,25 @@ public class QueryWrapper extends BaseQueryWrapper<QueryWrapper> {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public QueryWrapper and(String sql, Object... params) {
|
||||
this.addWhereQueryCondition(new StringQueryCondition(sql, params), SqlConnector.AND);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public QueryWrapper or(QueryCondition queryCondition) {
|
||||
return addWhereQueryCondition(queryCondition, SqlConnector.OR);
|
||||
}
|
||||
|
||||
public QueryWrapper or(String sql) {
|
||||
this.addWhereQueryCondition(new StringQueryCondition(sql), SqlConnector.OR);
|
||||
return this;
|
||||
}
|
||||
|
||||
public QueryWrapper or(String sql, Object... params) {
|
||||
this.addWhereQueryCondition(new StringQueryCondition(sql, params), SqlConnector.OR);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Joiner<QueryWrapper> leftJoin(String table) {
|
||||
return joining(Join.TYPE_LEFT, table, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user