Remove an expression.

@param ExpressionContract $expression

@return self
345355
public function remove(ExpressionContract $expression)
    {
        $this->checkType($expression);
        unset($this->constraints[$expression->name()]);
        return $this;
    }
9091
public function addGroupBy(string ...$expression) : self
    {
        $this->groupByClauses = array_merge($this->groupByClauses, $expression);

        return $this;
    }
322662
public function removeAttribute(string $attribute): self
    {
        // Determine if the attribute is present, unset if present
        if (array_key_exists($attribute, $this->attributes)) {
            unset($this->attributes[$attribute]);
        }

        return $this;
    }
991936
public function selectRaw(string $expression, array $bindings = []): BaseQueryRelateContract
    {
        $this->query->selectRaw($expression, $bindings);

        return $this;
    }
731942
public function deleteExpression($entityId, $entityValue, $expression)
    {
        $response = $this->client->delete(sprintf('/entities/%s/values/%s/expressions/%s', $entityId, $entityValue, $expression));

        return $this->decodeResponse($response);
    }
285933
public function removeExpression($expression)
    {
        if ($this->expressions->contains($expression)) {
            $this->expressions->removeElement($expression);
        }

        return $this;
    }
253978
public function removeOperator(string $operator): self
    {
        $this->validateOperator($operator);
        if (false !== ($key = array_search($operator, $this->operators))) {
            unset($this->operators[$key]);
        }

        return $this;
    }
35477
protected function checkType(ExpressionContract $expression)
    {
        if (!$expression instanceof ConstraintContract) {
            throw new InvalidArgumentException("ConstraintGroup works only with Constraint not " . Type::of($expression));
        }

        return $expression;
    }
1261770
public function removeRev($relation)
        {
            if (isset($this->_rev[$relation])) {
                unset($this->_rev[$relation]);
            }

            return $this;
        }
109001
public static Expression arrayRemove(String expression, Expression value) {
        return arrayRemove(x(expression), value);
    }
215709
public function then($expression) : self
    {
        if (! is_array($this->switchBranch)) {
            throw new BadMethodCallException(static::class . '::then requires a valid case statement (call case() first).');
        }

        $this->switchBranch['then'] = $expression;

        if ($this->currentField) {
            $this->expr[$this->currentField]['$switch']['branches'][] = $this->ensureArray($this->switchBranch);
        } else {
            $this->expr['$switch']['branches'][] = $this->ensureArray($this->switchBranch);
        }

        $this->switchBranch = null;

        return $this;
    }
727994
public function batchDelete($expression)
    {
        // remove
        $result = $this->getMongoCollection()->remove(
            Expression::convertToArray($expression)
        );

        // check result
        if (true !== $result && $result['ok'] != 1) {
            throw new Exception('Error removing documents from collection: ' . $result['err']);
        }

        return $this;
    }
1316035
public function addOrderBy(string ...$expression) : self
    {
        $this->orderBy = array_merge($this->orderBy, $expression);

        return $this;
    }
1075058
public function removeFilter($operator, $attribute)
    {
        if (isset($this->filters[$operator][$attribute])) {
            unset($this->filters[$operator][$attribute]);
        }
        return $this;
    }
747972
public function removeFilter($field, $operator)
    {
        if (isset($this->filters[$field][$operator])) {
            unset($this->filters[$field][$operator]);
        }

        return $this;
    }
556045
public function tokenize($expression)
    {
        if ($expression !== '') {
            $flags          = PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY;
            $this->iterator = new \CallbackFilterIterator(
                new \ArrayIterator(
                    preg_split(self::$expressionPartsPattern, $expression, 0, $flags)
                ),
                function ($value) {
                    //skip spaces
                    if ($value === ' ') {
                        return false;
                    }

                    //skip whitespaces but count newlines
                    if (rtrim($value) === '') {
                        $this->line += substr_count($value, "\n");

                        return false;
                    }

                    return true;
                }
            );
            $this->iterator->rewind();
        } else {
            $this->iterator = new \EmptyIterator();
        }

        return new Stream($this);
    }
817482
public function withExpression(string $expression): self
    {
        if (!(new \ReflectionClass($expression))->implementsInterface(Expression::class)) {
            throw new DomainException($expression);
        }

        $self = clone $this;
        $self->expression = new $expression($self->name);

        return $self;
    }