Class QueryConditions

java.lang.Object
com.ptsmods.mysqlw.query.QueryCondition
com.ptsmods.mysqlw.query.QueryConditions

public class QueryConditions extends QueryCondition
A collection of QueryConditions which a query must meet to affect or return rows.
  • Method Details

    • create

      public static QueryConditions create()
      Returns:
      Empty QueryConditions.
    • create

      public static QueryConditions create(QueryCondition first)
      Parameters:
      first - The first QueryCondition in these QueryConditions.
      Returns:
      QueryConditions with the given QueryCondition.
    • and

      public QueryConditions and(QueryCondition condition)
      Adds a QueryCondition with the AND keyword to the end.
      Parameters:
      condition - The actual condition
      Returns:
      These QueryConditions for chaining.
    • and

      public QueryConditions and(int index, QueryCondition condition)
      Adds a QueryCondition with the AND keyword at a specific index.
      Parameters:
      index - The index to add this QueryCondition at
      condition - The actual condition
      Returns:
      These QueryConditions for chaining.
    • or

      public QueryConditions or(QueryCondition condition)
      Adds a QueryCondition with the OR keyword to the end.
      Parameters:
      condition - The actual condition
      Returns:
      These QueryConditions for chaining.
    • or

      public QueryConditions or(int index, QueryCondition condition)
      Adds a QueryCondition with the OR keyword at a specific index.
      Parameters:
      index - The index to add this QueryCondition at
      condition - 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 uses
      condition - 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 at
      keyword - The keyword this QueryCondition uses
      condition - The actual condition
      Returns:
      These QueryConditions for chaining.
    • toString

      public String toString()
      Specified by:
      toString in class QueryCondition