@param string $field
@param string|array $value

@return Expression
969729
public function where($field, $value)
    {
        if (!isset($this->_expression[$field]) || !is_array($value) || !is_array($this->_expression[$field])) {
            $this->_expression[$field] = $value;
        } else {
            $this->_expression[$field] = array_merge_recursive($this->_expression[$field], $value);
        }

        return $this;
    }
683270
public function makeArrayFieldValue($value)
    {
        $value = $this->_unserializeValue($value);
        if (!$this->_isEncodedArrayFieldValue($value)) {
            $value = $this->_encodeArrayFieldValue($value);
        }

        return $value;
    }
494775
public function eq($field, $value)
    {
        return function ($object) use ($field, $value) {
            return ClosureExpressionBuilder::getObjectFieldValue($object, $field) === $value;
        };
    }
466850
public function eq($field, $value) {
        if (is_array($value)) {
            $this->in($field, $value);

        } else if ($value === null) {
            $this->null($field);

        } else {
            $this->add($field, '=', $value);
        }

        return $this;
    }
1117469
public function gte($field, $value)
    {
        if(!$value instanceof Expr\ConditionalExpression) {
            $value = $this->buildPart($value);
        }
        return new Expr\ComparisonExpression($field, $value, Expr\ComparisonExpression::GTE);
    }
874914
public function in($field, array $values)
    {
        return function ($object) use ($field, $values) {
            return in_array(ClosureExpressionBuilder::getObjectFieldValue($object, $field), $values);
        };
    }
430642
public function neq($field, $value)
    {
        if(!$value instanceof Part) {
            $value = $this->buildPart($value);
        }
        return new Expr\ComparisonExpression($field, $value, Expr\ComparisonExpression::NEQ);
    }
393402
public function addField(string $field, string $value): self
    {
        $this->fields[$field] = $value;

        return $this;
    }
520958
public function filterEq(string $field, $value): self
    {
        $this->filters[] = new IndexQueryFilter($field, IndexQueryFilterOperator::EQUAL_TO(), $value);
        return $this;
    }
107179
public function oneByIntOrFail(string $field, int $value): Model
    {
        return $this->oneByOrFail($field, $value);
    }
1034762
public function normalizeValue($field, $value)
    {
        if ($value === null || !$this->_types) {
            return $value;
        }

        if (!isset($this->_types[$field])) {
            throw new MisuseException(['`:field` field type is not defined', 'field' => $field]);
        }

        $type = $this->_types[$field];

        if ($type === 'string') {
            return is_string($value) ? $value : (string)$value;
        } elseif ($type === 'int') {
            return is_int($value) ? $value : (int)$value;
        } elseif ($type === 'float') {
            return is_float($value) ? $value : (float)$value;
        } elseif ($type === 'objectid') {
            return is_scalar($type) ? new ObjectId($value) : $value;
        } elseif ($type === 'bool') {
            return is_bool($value) ? $value : (bool)$value;
        } elseif ($type === 'array') {
            return (array)$value;
        } else {
            throw new InvalidValueException(['normalize `:type` type value is not supported', 'type' => $type]);
        }
    }
754794
public function whereRegexp($field, $value, $flags = 'ALL')
    {
        $this->wheres['must'][] = [
            'regexp' => [
                $field => [
                    'value' => $value,
                    'flags' => $flags,
                ],
            ],
        ];

        return $this;
    }
817963
public function setField(string $field, string $value)
        {
                return $this->_redis->hset($this->_key, $field, $value);
        }
426571
protected function parseValue($value, $field = '')
    {
        unset($field);
        if (is_string($value)) {
            $value = strpos($value, ':') === 0 && $this->query->isBind(substr($value, 1)) ? $value : $this->connection->quote($value);
        } elseif (is_array($value)) {
            $value = array_map([$this, 'parseValue'], $value);
        } elseif (is_bool($value)) {
            $value = $value ? '1' : '0';
        } elseif (is_null($value)) {
            $value = 'null';
        }
        return $value;
    }
943227
public function compileStartsWith($field, $value)
    {
        return $this->wrap($field.Operator::$equals.$value.Operator::$has);
    }
1191902
public function eq($field, $value)
    {
        if(!$value instanceof Part) {
            $value = $this->buildPart($value);
        }
        return new Expr\ComparisonExpression($field, $value, Expr\ComparisonExpression::EQ);
    }
1054516
public function whereRegex($field, $value)
    {
        if (! $value instanceof MongoRegex) {
            $value = new MongoRegex($value);
        }

        return $this->formatWhere('$and', $field, $value);
    }