where or 语句

@param string $column
@param mixed  $value
@param string $operator

@return QueryBuilder
517846
public function orWhere($column, $value, $operator = self::OPERATOR_EQ): self
    {
        $this->criteria($this->where, $column, $value, $operator, self::LOGICAL_OR);

        return $this;
    }
1089138
public static function where($column, $operator = null, $value = null, $type = " AND ")
    {
        return self::getInstance()->whereExecute($column, $operator, $value, $type);
    }
1020618
public function orWhereMonth($column, $operator, $value = null)
    {
        $this->wConditions()->orMonth(...func_get_args());

        return $this;
    }
552274
public function where($column, $operator, $value)
    {
        $capsule = $this->_database->getCapsule();

        if (empty($column)) {
            throw new \Exception('You must provide the column to look up!');
        }
        if (empty($operator)) {
            throw new \Exception('You must provide an operator!');
        }
        if (empty($value)) {
            throw new \Exception('You must provide the value!');
        }

        $this->_model = $capsule->table($this->table)->where($column, $operator, $value);

        return $this->_model;
    }
853795
public function where($key, $operator = null, $value = null): IQueryBuilderHandler
    {
        // If two params are given then assume operator is =
        if (\func_num_args() === 2) {
            $value = $operator;
            $operator = '=';
        }

        if (\is_bool($value) === true) {
            $value = (int)$value;
        }

        return $this->whereHandler($key, $operator, $value);
    }
1053544
public function orHavingDate($column, $operator, $value = null)
    {
        $this->hConditions()->orDate(...func_get_args());

        return $this;
    }
109307
public function andWhere($column, $operator, $value = null)
    {
        $this->andWheres[] = new Where($column, $operator, $value, 'AND');

        return $this;
    }
133542
protected static function whereExecute($column, $operator, $value, $type)
    {
        $self      = self::getInstance();

        if (is_array($column)) {
            return $self->makeArrayOfWhere($column, $type);
        } else {
            return $self->makeStringOfWhere($column, $operator, $value, $type);
        }

        return $self;
    }
606510
protected function addWhere($query, $column, $operator, $value)
    {
        if ('in' === $operator) {
            return $query->whereIn($column, $value);
        } elseif ('between' === $operator) {
            return $query->whereBetween($column, $value);
        } else {
            return $query->where($column, $operator, $value);
        }
    }
730687
public function where($column, $operator = null, $value = null, $boolean = 'and')
    {
        // If the column is an array, we will assume it is an array of key-value pairs
        // and can add them each as a where clause. We will maintain the boolean we
        // received when the method was called and pass it into the nested where.
        if (is_array($column)) {
            return $this->addArrayOfWheres($column, $boolean);
        }

        // Here we will make some assumptions about the operator. If only 2 values are
        // passed to the method, we will assume that the operator is an equals sign
        // and keep going. Otherwise, we'll require the operator to be passed in.
        list($value, $operator) = $this->prepareValueAndOperator(
            $value,
            $operator,
            func_num_args() == 2
        );

        // If the columns is actually a Closure instance, we will assume the developer
        // wants to begin a nested where statement which is wrapped in parenthesis.
        // We'll add that Closure to the query then return back out immediately.
        if ($column instanceof Closure) {
            return $this->whereNested($column, $boolean);
        }

        // If the given operator is not found in the list of valid operators we will
        // assume that the developer is just short-cutting the '=' operators and
        // we will set the operators to '=' and set the values appropriately.
        if (! in_array(strtolower($operator), $this->operators, true) &&
            ! in_array(strtolower($operator), $this->grammar->getOperators(), true)) {
            list($value, $operator) = [$operator, '='];
        }

        // If the value is a Closure, it means the developer is performing an entire
        // sub-select within the query and we will need to compile the sub-select
        // within the where clause to get the appropriate query record results.
        if ($value instanceof Closure) {
            return $this->whereSub($column, $operator, $value, $boolean);
        }

        // If the value is "null", we will just assume the developer wants to add a
        // where null clause to the query. So, we will allow a short-cut here to
        // that method for convenience so the developer doesn't have to check.
        if (is_null($value)) {
            return $this->whereNull($column, $boolean, $operator != '=');
        }

        // Now that we are working with just a simple query we can put the elements
        // in our array and add the query binding to our array of bindings that
        // will be bound to each SQL statements when it is finally executed.
        $type = 'Basic';

        if (mb_strpos($column, '->') !== false && is_bool($value)) {
            $value = new Expression($value ? 'true' : 'false');
        }

        $this->wheres[] = compact('type', 'column', 'operator', 'value', 'boolean');

        if (! $value instanceof Expression) {
            $this->addBinding($value, 'where');
        }

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

        return $this;
    }
671228
public static function where($column, $operator = null, $value = null, $boolean = 'and')
    {
        if ($boolean !== 'and') {
            throw new NotSupportedException('Only support "and" in where clause');
        }
        $model = static::getInstance();
        // If the column is an array, we will assume it is an array of key-value pairs
        // and can add them each as a where clause. We will maintain the boolean we
        // received when the method was called and pass it into the nested where.
        if (is_array($column)) {
            foreach ($column as $key => $value) {
                $model->addWhere($key, '=', $value, $boolean);
            }

            return $model;
        }

        $model->addWhere($column, $operator, $value, $boolean);

        return $model;
    }
1276690
public function filter($column, $operator = null, $value = null)
	{
		if( !isset($this->valid_columns[$column]) )
		{
			throw new InvalidArgumentException("Column '{$column}' not used");
		}

		$this->wheres[] = [ $this->valid_columns[$column], $operator, $value ];
		return $this;
	}
526903
public function orWhere($column, $comp = '=', $value = null)
    {
        if (is_null($this->where)) {
            throw new QueryBuilderException(
                'Cette fonction ne peut pas être utiliser sans un where avant.',
                E_ERROR
            );
        }

        return $this->where($column, $comp, $value, 'or');
    }
150702
public function where($field, $operator = null, $value = null)
    {
        $this->query->where($field, $operator, $value);

        return $this;
    }
1168586
public function orHaving($column, $operator = null, $value = null): BaseQueryRelateContract
    {
        $this->query->orHaving($column, $operator, $value);

        return $this;
    }
1337550
public function orWhere($column, $operator, $value = null)
    {
        $this->orWheres[] = new Where($column, $operator, $value, 'OR');

        return $this;
    }