@param Operand|string $field
@param Operand|mixed  $value
@param string|null    $dqlAlias

@return Comparison
197961
public static function gt($field, $value, $dqlAlias = null)
    {
        return new Comparison(Comparison::GT, $field, $value, $dqlAlias);
    }
1117884
protected function checkIsNullField($app, $field, $value = null)
    {
        return ! is_null($app->$field) ? $app->$field : $value;
    }
573380
public function where(string $field, $value)
    {
        $matches = [];
        // We check whether there is a specific operator in the field name,
        // and if so we validate it against a whitelist
        if (\preg_match('/(.+)\[([a-zA-Z]+)\]/', $field, $matches)) {
            $operator = \mb_strtolower($matches[2]);

            if (!\in_array($operator, self::$validOperators, true)) {
                throw new \InvalidArgumentException(\sprintf(
                    'Unknown operator "%s" given. Expected "%s" or no operator.',
                    $operator,
                    \implode(', ', self::$validOperators)
                ));
            }
        }

        if ($value instanceof \DateTimeInterface) {
            $value = $value->format(self::DATE_FORMAT);
        }
        if ($value instanceof Location) {
            $value = $value->queryStringFormatted();
        }
        if (\is_array($value)) {
            $value = \implode(',', $value);
        }

        $this->whereConditions[$field] = $value;

        return $this;
    }
298219
public static Query notEquals(String field, Object value) {
        return new Query().notEquals(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;
    }
261196
public static function expr($field, $operator = null, $value = null) {
        return new Expr($field, $operator, $value);
    }
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;
    }
494775
public function eq($field, $value)
    {
        return function ($object) use ($field, $value) {
            return ClosureExpressionBuilder::getObjectFieldValue($object, $field) === $value;
        };
    }
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;
    }
885068
private static function determineValue($value, $field = null, $replacements = null)
    {
        // process parameter replacements
        if (is_string($value) && !empty($value) && (':' == $value[0])) {
            if (isset($replacements, $replacements[$value])) {
                $value = $replacements[$value];
            }
        }

        if ($field && (static::DEFAULT_ID_FIELD == $field)) {
            $value = static::idToMongoId($value);
        }

        if (is_string($value)) {
            if (trim($value, "'\"") !== $value) {
                return trim($value, "'\""); // meant to be a string
            }

            if (is_numeric($value)) {
                return ($value == strval(intval($value))) ? intval($value) : floatval($value);
            }

            if (0 == strcasecmp($value, 'true')) {
                return true;
            }

            if (0 == strcasecmp($value, 'false')) {
                return false;
            }
        }

        return $value;
    }
1054516
public function whereRegex($field, $value)
    {
        if (! $value instanceof MongoRegex) {
            $value = new MongoRegex($value);
        }

        return $this->formatWhere('$and', $field, $value);
    }
100643
public static function lte($field, $value, $dqlAlias = null)
    {
        return new Comparison(Comparison::LTE, $field, $value, $dqlAlias);
    }
1209847
public function andWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
    {
        if (strpos($field, '.') > 0) {
            //monta os joins
            $this->fieldValue = [
                'value'     => $value,
                'operation' => $operation,
            ];
            $newAliasField = $this->associationQueryFields($field);
            $alias = $newAliasField['alias'];
            $field = $newAliasField['field'];
        }
        $this->queryBuilder->andWhere($this->makeExpression($field, $operation, $value, $alias));

        return $this;
    }
848461
public function parseField($value, string $fieldType)
    {
        // Uses $fieldType method of the schema to parse the value
        if (method_exists($this->schema, $fieldType)) {
            return $this->schema->$fieldType($value);
        }

        // Returns null or an empty array
        if (null === $value || is_array($value) && empty($value)) {
            return $value;
        }

        // If fieldType is castable (Ex: 'int')
        if (in_array($fieldType, $this->castableTypes)) {
            return $this->cast($value, $fieldType);
        }

        // If the field type points to another schema.
        if ('schema.' == substr($fieldType, 0, 7)) {
            return $this->mapToSchema($value, substr($fieldType, 7));
        }

        return $value;
    }
713282
public function isNotNull($field)
    {
        return new Expr\ComparisonExpression($field, new Expr\ValueIdentifier(null), Expr\ComparisonExpression::NEQ);
    }
836529
public static function like($field, $value, $format = Like::CONTAINS, $dqlAlias = null)
    {
        return new Like($field, $value, $format, $dqlAlias);
    }
814361
public function pull($field, $value, $operator = null, $all = false)
    {
        if ($operator) {
            $value = [$operator => $value];
        }

        return $this->update($all ? '$pullAll' : '$pull', $field, $value);
    }