Class ConditionalStatement

java.lang.Object
com.github.tadukoo.database.mysql.syntax.conditional.ConditionalStatement

public class ConditionalStatement extends Object
Conditional Statement represents a single conditional statement in MySQL (it may be part of a greater Conditional)
Version:
Alpha v.0.3
Author:
Logan Ferree (Tadukoo)
  • Field Details

    • negated

      private final boolean negated
      Whether this statement is negated or not
    • column

      private final ColumnRef column
      The column of this statement
    • operator

      private final SQLOperator operator
      The operator of this statement
    • value

      private final Object value
      The value of this statement
  • Constructor Details

    • ConditionalStatement

      private ConditionalStatement(boolean negated, ColumnRef column, SQLOperator operator, Object value)
      Constructs a new conditional statement with the given parameters
      Parameters:
      negated - Whether the statement is negated or not
      column - The column of the statement
      operator - The operator of the statement
      value - The value of the statement
  • Method Details

    • builder

      public static ConditionalStatement.Column builder()
      Returns:
      A new builder to build a ConditionalStatement
    • isNegated

      public boolean isNegated()
      Returns:
      Whether this statement is negated or not
    • getColumn

      public ColumnRef getColumn()
      Returns:
      The column of this statement
    • getOperator

      public SQLOperator getOperator()
      Returns:
      The operator of this statement
    • getValue

      public Object getValue()
      Returns:
      The value of this statement
    • toString

      public String toString()
      Overrides:
      toString in class Object