Package cool.scx.data.query
Class Where
- All Implemented Interfaces:
Query
where 查询条件封装类
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class cool.scx.data.query.QueryLike
addGroupBy, addOrderBy, addWhere, clearGroupBy, clearLimit, clearOffset, clearOrderBy, clearWhere, getGroupBy, getLimit, getLimitInfo, getOffset, getOrderBy, getWhere, groupBy, limit, offset, orderBy, where
-
Constructor Details
-
Where
public Where()创建一个 Where 对象 -
Where
根据旧的 Where 创建一个 Where 对象- Parameters:
oldWhere- 旧的 Where
-
-
Method Details
-
isEmpty
public boolean isEmpty()查询条件是否为空- Returns:
- a boolean
-
set
设置 whereSQL 适用于 复杂查询的自定义 where 子句
支持三种类型 String , WhereBody 和 AbstractPlaceholderSQL 在最终 cool.scx.sql 中会拼接到 where 子句的最后
注意 : 除特殊语法外不需要手动在头部添加 AND- Parameters:
whereClauses- cool.scx.sql 语句- Returns:
- 本身 , 方便链式调用
-
add
-
clauses
-
clear
清除所有 where 条件 (不包括 whereSQL)- Returns:
- this 方便链式调用
-
toQuery
-