Set where condition.

@param  string $flag
@param  string $value
@return $this
345907
public function where($flag, $value = null)
    {
        if (!in_array(strtolower($flag), static::$searchCriteria)) {
            throw new InvalidArgumentException("Invalid where criteria '{$flag}'");
        }

        $this->where[$flag] = $value;
        return $this;
    }
221501
public function whereDate($column, $operator, $value = null)
    {
        $this->wConditions()->date(...func_get_args());

        return $this;
    }
1145266
public function setStale($flag)
    {
        if (!is_bool($flag)) {
            $this->params['stale'] = $flag;
        } elseif ($flag === true) {
            $this->params['stale'] = 'ok';
        } else {
            unset($this->params['stale']);
        }

        return $this;
    }
560815
public function orWhereLike($field, $value, $flags = 'imxsu', $delimiter = null)
    {
        return $this->whereLike($field, $value, $flags, $delimiter, '$or');
    }
694483
public function egt($value) {
        $this->rule = $value;
        $this->check_role = 'egt';
        $result = !is_null($this->value) && $this->value >= $value;
        $this->checkResult($result);
        return $this;
    }
111388
public function whereDay($column, $operator, $value = null)
    {
        $this->wConditions()->day(...func_get_args());

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

        return $this;
    }
974615
public function whereIn($key, $value)
    {
        $exp = explode(',', $value);
        $this->where[] = 'AND '.$key.' IN ('.$this->createPlaceHolder($exp).') ';

        foreach ($exp as $key => $val) {
            $this->bindings[$key] = $val;
        }

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

        return $this;
    }
119250
protected function process($value, $flags)
    {
        $config = $this;

        if (!is_string($value)) {
            return $value;
        }

        return preg_replace_callback(
            '#\{\$(.+)\}#',
            function ($match) use ($config, $flags) {
                return $config->get($match[1], $flags);
            },
            $value
        );
    }
82180
public function whereInset($field, $value)
    {
        $key = strtr($field, '.', '_');
        $this->_conditions[] = 'FIND_IN_SET(:' . $key . ', ' . '[' . str_replace('.', '].[', $field) . '])>0';
        $this->_bind[$key] = $value;

        return $this;
    }
848406
public function setStatus($position, $value)
    {
        $status = pow(2, $position - 1);
        if ($value) {
            $status = $this['status'] | $status;
        } elseif ($this['status'] !== null) {
            $status = $this['status'] & ~$status;
        } else {
            $status = ~$status;
        }
        $this['status'] = $status & 0xFFFF;

        return $this;
    }
1265597
public static function isOn($value, $flag)
    {
        if (!Int::is($value)) {
            throw new \InvalidArgumentException("The \$value parameter must be of type int.");
        }

        if (!static::is($flag)) {
            throw new \InvalidArgumentException("The \$flag parameter must be of type int and a power of 2.");
        }

        return static::is($value & $flag);
    }
709312
public function whereRegex($field, $regex, $flags = '')
    {
        foreach ($this->queries as $query) {
            $query->whereRegex($field, $regex, $flags);
        }

        return $this;
    }
1152524
public function setFlag($flag)
	{
		if ( $flag == $this->getFlag() ) { return; }

		$this->_values['flag'] = (int) $flag;
		$this->setModified();
	}
1289252
public function orWhere($condition, $value = null, $type = null) {
		$this->_criteria->orWhere($condition);
		
		return $this;
	}
1231647
public function whereTime($column, $operator, $value = null)
    {
        $this->wConditions()->time(...func_get_args());

        return $this;
    }