Sets a where condition

@param string $column Column name
@param string $value Value to match
@param string $operator Operator to compare with
@return object Database instance
183554
public function where($column, $value, $operator = '=', $table = null)
    {
        $table = $table? $table : $this->table;
        $this->db()->where($column, $value, $operator, $table);
        return $this;
    }
1311740
public function where($column, $operator = '=', $value = null, $boolean = 'and', array $columns = ['*'])
    {
        return $this->mediator->transform($this->mediator(func_get_args()));
    }
1272260
public function having($column, $operator, $value = null)
    {
        $instance = $this->havingStrategyInstance();

        $instance->havingStrategy()->having(...func_get_args());

        return $instance;
    }
702883
public function orHavingTime($column, $operator, $value = null)
    {
        $this->hConditions()->orTime(...func_get_args());

        return $this;
    }
574301
public function orWhereYear($column, $operator, $value = null)
    {
        $this->wConditions()->orYear(...func_get_args());

        return $this;
    }
1110963
public function orWhere($column, $operator, $value = null)
    {
        $this->wConditions()->orColumn(...func_get_args());

        return $this;
    }
1055175
public function date($column, $operator, $value = null)
    {
        if (func_num_args() < 3) {
            $value = $operator;

            $operator = null;
        }

        $this->addColumn('AND', $column, $operator, $value,
            function (string $column) {
                return 'DATE(' . $column . ')';
            },

            function (string $value) {
                return $this->dialect()->dateString($value);
            }
        );

        return $this;
    }
116107
public function orWhereDay($column, $operator, $value = null)
    {
        $this->wConditions()->orDay(...func_get_args());

        return $this;
    }
754451
public function orHavingYear($column, $operator, $value = null)
    {
        $this->hConditions()->orYear(...func_get_args());

        return $this;
    }
521366
public function having($column, $operator = '=', $value = null)
    {
        $this->havingType = 'AND';

        return $this->addCondition('having', $column, $operator, $value);
    }
539406
public function where($column, $operator, $value, $filter = false)
    {
        return $this->constraint(__FUNCTION__, $column, $operator, $value, $filter);
    }
1274644
public function conditionFactory($column, $value, $operator = '=')
    {
        $currentOrIndex = isset($this->sql['where']['$or']) ? count($this->sql['where']['$or']) - 1 : 0;

        if ($this->opIsAnd) {
            if (isset($this->sql['where'][$column][$operator])) {
                throw new \InvalidArgumentException('Mongodb Where Op key Is Exists[' . $column . $operator . ']');
            }
        } else if ($this->bracketsIsOpen) {
            if (isset($this->sql['where']['$or'][$currentOrIndex][$column][$operator])) {
                throw new \InvalidArgumentException('Mongodb Where Op key Is Exists[' . $column . $operator . ']');
            }
        }

        switch ($operator) {
            case 'IN':
                // no break
            case 'NOT IN':
                empty($value) && $value = [0];
                //这边可直接跳过不组装sql，但是为了给用户提示无条件 便于调试还是加上where field in(0)
                if ($this->opIsAnd) {
                    $this->sql['where'][$column][$operator == 'IN' ? '$in' : '$nin'] = $value;
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column][$operator == 'IN' ? '$in' : '$nin'] = $value;
                } else {
                    $this->sql['where']['$or'][][$column] = $operator == 'IN' ? ['$in' => $value] : ['$nin' => $value];
                }
                break;
            case 'BETWEEN':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column]['$gt'] = $value[0];
                    $this->sql['where'][$column]['$lt'] = $value[1];
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$gt'] = $value[0];
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$lt'] = $value[1];
                } else {
                    $this->sql['where']['$or'][][$column] = ['$gt' => $value[0], '$lt' => $value[1]];
                }
                break;
            case 'NOT BETWEEN':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column]['$lt'] = $value[0];
                    $this->sql['where'][$column]['$gt'] = $value[1];
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$lt'] = $value[0];
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$gt'] = $value[1];
                } else {
                    $this->sql['where']['$or'][][$column] = ['$lt' => $value[0], '$gt' => $value[1]];
                }
                break;
            case 'IS NULL':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column]['$in'] = [null];
                    $this->sql['where'][$column]['$exists'] = true;
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$in'] = [null];
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$exists'] = true;
                } else {
                    $this->sql['where']['$or'][][$column] = ['$in' => [null], '$exists' => true];
                }
                break;
            case 'IS NOT NULL':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column]['$ne'] = null;
                    $this->sql['where'][$column]['$exists'] = true;
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$ne'] = null;
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$exists'] = true;
                } else {
                    $this->sql['where']['$or'][][$column] = ['$ne' => null, '$exists' => true];
                }
                break;
            case '>':
                //no break;
            case '<':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column][$operator == '>' ? '$gt' : '$lt'] = $value;
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column][$operator == '>' ? '$gt' : '$lt'] = $value;
                } else {
                    $this->sql['where']['$or'][][$column] = $operator == '>' ? ['$gt' => $value] : ['$lt' => $value];
                }
                break;
            case '>=':
                //no break;
            case '<=':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column][$operator == '>=' ? '$gte' : '$lte'] = $value;
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column][$operator == '>=' ? '$gte' : '$lte'] = $value;
                } else {
                    $this->sql['where']['$or'][][$column] = $operator == '>=' ? ['$gte' => $value] : ['$lte' => $value];
                }
                break;
            case 'NOT LIKE':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column]['$not'] = new Regex($value, 'i');
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$not'] = new Regex($value, 'i');
                } else {
                    $this->sql['where']['$or'][][$column] = ['$not' => new Regex($value, 'i')];
                }
                break;
            case 'LIKE':
                //no break;
            case 'REGEXP':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column]['$regex'] = $value;
                    $this->sql['where'][$column]['$options'] = '$i';
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$regex'] = $value;
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$options'] = '$i';
                } else {
                    $this->sql['where']['$or'][][$column] = ['$regex' => $value, '$options' => '$i'];
                }
                break;
            case '!=':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column]['$ne'] = $value;
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column]['$ne'] = $value;
                } else {
                    $this->sql['where']['$or'][][$column] = ['$ne' => $value];
                }
                break;
            case '=':
                if ($this->opIsAnd) {
                    $this->sql['where'][$column] = $value;
                } else if ($this->bracketsIsOpen) {
                    $this->sql['where']['$or'][$currentOrIndex][$column] = $value;
                } else {
                    $this->sql['where']['$or'][][$column] = $value;
                }
                break;
            case 'column':
                $this->sql['where']['$where'] = "this.{$column} = this.{$value}";
                break;
            case 'raw':
                $this->sql['where']['$where'] = $column;
                break;
        }
        return $this;
    }
579697
public function whereMonth($column, $operator, $value = null)
    {
        $this->wConditions()->month(...func_get_args());

        return $this;
    }
65281
public function orHaving($column, $operator = null, $value = null)
    {
        return $this->having($column, $operator, $value, 'or');
    }
916692
public function orWhereMonth($column, $operator, $value = null)
    {
        [$value, $operator] = $this->prepareValueAndOperator(
            $value, $operator, func_num_args() === 2
        );

        return $this->addDateBasedWhere('Month', $column, $operator, $value, 'or');
    }
373424
public function where($column, $value = '', $operator = Criterion::EQUALS, $variable = null, $additional = null, $special = null): Criteria
        {
            if (!$column instanceof Criteria) {
                $criteria = new Criteria();
                $criteria->where($column, $value, $operator, $variable, $additional, $special);
                $column = $criteria;
            }

            $column->setQuery($this);
            $this->criteria[] = $column;

            return $column;
        }
575342
public function where($column, String $value = NULL, String $logical = 'and')
    {
        $this->settings['where']       = true;
        $this->settings['whereValue']  = $value;
        $this->settings['whereColumn'] = $column;

        Singleton::class('ZN\Database\DB')->where($column, $value, $logical);

        return $this;
    }