@param string $field
@param string $operator
@param string $field2

@return WhereClause
516394
public function or(string $field, string $operator, string $field2)
    {
        $this->and($field, $operator, $field2);
        $this->convertToOrJunction();

        return $this;
    }
502360
public function rightJoin($table, $field1, $operator, $field2) {
        array_push($this->_joins, ' RIGHT JOIN ' . $table . ' ON ' . $field1 . ' ' . $operator . ' ' . $field2 . ' ');
    
        return $this;
    }
786082
public function orWhereInfix($field, $operator = '=', $condition = false)
    {
        $numArgs = func_num_args();
        if ($numArgs > 2) {
            $this->where->addOrCondition($field, $condition, $operator);
        } elseif ($numArgs == 2) {
            $this->where->addOrCondition($field, $operator, '=');
        } else {
            $this->where->addOrCondition($field);
        }

        return $this;
    }
539406
public function where($column, $operator, $value, $filter = false)
    {
        return $this->constraint(__FUNCTION__, $column, $operator, $value, $filter);
    }
286630
public function addFilter($field, $value, $operator)
    {
        if ((is_numeric($field) || !empty($field)) && (!empty($value) || $value == '0')) {
            if (!is_null($operator)) {
                $this->filters[$field][$operator] = $value;
            } else {
                $this->filters[$field] = $value;
            }
        }

        return $this;
    }
1085934
public function whereBetween(string $field, $value1, $value2)
    {
        return $this->addCondition('AND', $field, [$value1, $value2], 'BETWEEN');
    }
1181328
public function where($field, $operator = null, $value = null)
    {
        return $this->andWhere($field, $operator, $value);
    }
830785
public function orWhere($column, $operator = null, $value = null)
    {
        [$value, $operator] = $this->prepareValueAndOperator(
            $value, $operator, func_num_args() === 2
        );

        return $this->where($column, $operator, $value, 'or');
    }
465092
private function addOperator($operator, $field, $value) {
		$this->is($field, array('$' . $operator => $value));
		
		return $this;
	}
394289
protected function compare($first, $second, $operator)
    {
        switch ($operator) {
            case '<':
                return $first < $second;
            case '>':
                return $first > $second;
            case '<=':
                return $first <= $second;
            case '>=':
                return $first >= $second;
            case '=':
                return $first == $second;
            default:
                throw new InvalidArgumentException;
        }
    }
144131
public function condition($field, $value = NULL, $expressionOperator = NULL)
    {

        if (!isset($expressionOperator)) {
            if (is_array($value)) {
                $expressionOperator = 'IN';
            }
            else {
                $expressionOperator = '=';
            }
        }
        $this->conditions[] = array(
            'field' => $field,
            'value' => $value,
            'operator' => $expressionOperator,
        );
        return $this;
    }
1213286
private function _where($operator, array $fields)
    {
        $count = count($fields);

        if ($count < 1 || $count > 3)
        {
            $fields = var_export($fields, true);
            throw new \InvalidArgumentException($fields);
        }

        $this->storageWhere[] = [$operator => $fields];

        return $this;
    }
114499
public function whereInfix($field, $operator = '=', $condition = false)
    {
        $numArgs = func_num_args();
        if ($numArgs > 2) {
            $this->where->addCondition($field, $condition, $operator);
        } elseif ($numArgs == 2) {
            $this->where->addCondition($field, $operator, '=');
        } else {
            $this->where->addCondition($field);
        }

        return $this;
    }
372492
public function computeCondition(string $field, string $operator, $value, string $table = null, bool $skipTablePrefix = false)
    {
        $operator = trim(strtolower($operator));
        $values = [];
        $pattern = '?';
        $addQuotes = false;

        if ($table) {
            Controller::loadDataContainer($table);

            $dca = &$GLOBALS['TL_DCA'][$table]['fields'][$field];

            if (isset($dca['sql']) && false !== stripos($dca['sql'], 'blob')) {
                $addQuotes = true;
            }
        }

        switch ($operator) {
            case static::OPERATOR_UNLIKE:
                if (\is_array($value)) {
                    foreach ($value as $val) {
                        $values[] = Controller::replaceInsertTags('%'.($addQuotes ? '"'.$val.'"' : $val).'%', false);
                    }

                    break;
                }
                $values[] = Controller::replaceInsertTags('%'.($addQuotes ? '"'.$value.'"' : $value).'%', false);

                break;

            case static::OPERATOR_EQUAL:
                $values[] = Controller::replaceInsertTags(\is_array($value) ? implode(' ', $value) : $value, false);

                break;

            case static::OPERATOR_UNEQUAL:
            case '<>':
                $values[] = Controller::replaceInsertTags(\is_array($value) ? implode(' ', $value) : $value, false);

                break;

            case static::OPERATOR_LOWER:
                $pattern = 'CAST(? AS DECIMAL)';
                $values[] = Controller::replaceInsertTags(\is_array($value) ? implode(' ', $value) : $value, false);

                break;

            case static::OPERATOR_GREATER:
                $pattern = 'CAST(? AS DECIMAL)';
                $values[] = Controller::replaceInsertTags(\is_array($value) ? implode(' ', $value) : $value, false);

                break;

            case static::OPERATOR_LOWER_EQUAL:
                $pattern = 'CAST(? AS DECIMAL)';
                $values[] = Controller::replaceInsertTags(\is_array($value) ? implode(' ', $value) : $value, false);

                break;

            case static::OPERATOR_GREATER_EQUAL:
                $pattern = 'CAST(? AS DECIMAL)';
                $values[] = Controller::replaceInsertTags(\is_array($value) ? implode(' ', $value) : $value, false);

                break;

            case static::OPERATOR_IN:
                $value = array_filter(explode(',', Controller::replaceInsertTags($value, false)));

                // skip if empty to avoid sql error
                if (empty($value)) {
                    break;
                }

                $pattern = '('.implode(
                        ',',
                        array_map(
                            function ($val) {
                                return '"'.addslashes(trim($val)).'"';
                            },
                            $value
                        )
                    ).')';

                break;

            case static::OPERATOR_NOT_IN:
                $value = array_filter(explode(',', Controller::replaceInsertTags($value, false)));

                // skip if empty to avoid sql error
                if (empty($value)) {
                    break;
                }

                $pattern = '('.implode(
                        ',',
                        array_map(
                            function ($val) {
                                return '"'.addslashes(trim($val)).'"';
                            },
                            $value
                        )
                    ).')';

                break;

            case static::OPERATOR_IS_NULL:
            case static::OPERATOR_IS_NOT_NULL:
            case static::OPERATOR_IS_EMPTY:
            case static::OPERATOR_IS_NOT_EMPTY:
                $pattern = '';

                break;

            default:
                if (\is_array($value)) {
                    foreach ($value as $val) {
                        $values[] = Controller::replaceInsertTags('%'.($addQuotes ? '"'.$val.'"' : $val).'%', false);
                    }

                    break;
                }
                $values[] = Controller::replaceInsertTags('%'.($addQuotes ? '"'.$value.'"' : $value).'%', false);

                break;
        }

        $operator = $this->transformVerboseOperator($operator);

        $explodedField = explode('.', $field);

        // remove table if already added to field name
        if (\count($explodedField) > 1) {
            $field = end($explodedField);
        }

        return [(!$skipTablePrefix && $table ? $table.'.' : '')."$field $operator $pattern", $values];
    }
1284054
public function orWhereRaw($field, $operator = null, $value = null)
    {
        return $this->where($field, $operator, $value, 'or', true);
    }
11983
public function whereColumn($field1, $operator, $field2 = null, $logic = 'AND')
    {
        if (is_array($field1)) {
            foreach ($field1 as $item) {
                $this->whereColumn($item[0], $item[1], isset($item[2]) ? $item[2] : null);
            }
            return $this;
        }

        if (is_null($field2)) {
            $field2   = $operator;
            $operator = '=';
        }

        return $this->parseWhereExp($logic, $field1, 'COLUMN', [$operator, $field2], [], true);
    }
155059
public static function whereColumn($a, $operator, $b = null)
    {
        list($operator, $b) = static::prepareOperatorAndValue(
            $operator, $b, func_num_args() === 2
        );

        return new ColumnConstraint($a, $operator, $b);
    }