Package com.ptsmods.mysqlw.query
Class QueryConditions
java.lang.Object
com.ptsmods.mysqlw.query.QueryCondition
com.ptsmods.mysqlw.query.QueryConditions
A collection of
QueryCondition
s which a query must meet to affect or return rows.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(int index, QueryConditions.ConditionKeyword keyword, QueryCondition condition) Adds a new QueryCondition at a specific index with a specific keyword.add
(QueryConditions.ConditionKeyword keyword, QueryCondition condition) Adds a QueryCondition with a specific keyword to the end.and
(int index, QueryCondition condition) Adds a QueryCondition with theAND
keyword at a specific index.and
(QueryCondition condition) Adds a QueryCondition with theAND
keyword to the end.static QueryConditions
create()
static QueryConditions
create
(QueryCondition first) or
(int index, QueryCondition condition) Adds a QueryCondition with theOR
keyword at a specific index.or
(QueryCondition condition) Adds a QueryCondition with theOR
keyword to the end.toString()
Methods inherited from class com.ptsmods.mysqlw.query.QueryCondition
bool, equals, func, greater, greaterEqual, in, less, lessEqual, like, match, notEquals, notIn, varEquals, varGreater, varGreaterEqual, varLess, varLessEqual, varNotEquals
-
Method Details
-
create
- Returns:
- Empty QueryConditions.
-
create
- Parameters:
first
- The firstQueryCondition
in these QueryConditions.- Returns:
- QueryConditions with the given QueryCondition.
-
and
Adds a QueryCondition with theAND
keyword to the end.- Parameters:
condition
- The actual condition- Returns:
- These QueryConditions for chaining.
-
and
Adds a QueryCondition with theAND
keyword at a specific index.- Parameters:
index
- The index to add this QueryCondition atcondition
- The actual condition- Returns:
- These QueryConditions for chaining.
-
or
Adds a QueryCondition with theOR
keyword to the end.- Parameters:
condition
- The actual condition- Returns:
- These QueryConditions for chaining.
-
or
Adds a QueryCondition with theOR
keyword at a specific index.- Parameters:
index
- The index to add this QueryCondition atcondition
- The actual condition- Returns:
- These QueryConditions for chaining.
-
add
Adds a QueryCondition with a specific keyword to the end.- Parameters:
keyword
- The keyword this QueryCondition usescondition
- The actual condition- Returns:
- These QueryConditions for chaining.
-
add
public QueryConditions add(int index, QueryConditions.ConditionKeyword keyword, QueryCondition condition) Adds a new QueryCondition at a specific index with a specific keyword.- Parameters:
index
- The index to add this QueryCondition atkeyword
- The keyword this QueryCondition usescondition
- The actual condition- Returns:
- These QueryConditions for chaining.
-
toString
- Specified by:
toString
in classQueryCondition
-