src/Expression.php
public function expr($properties = [], $arguments = null)
    {
        // If we use DSQL Connection, then we should call expr() from there.
        // Connection->expr() will return correct, connection specific Expression class.
        if ($this->connection instanceof Connection) {
            return $this->connection->expr($properties, $arguments);
        }

        // Otherwise, connection is probably PDO and we don't know which Expression
        // class to use, so we make a smart guess :)
        if ($this instanceof Query) {
            $e = new self($properties, $arguments);
        } else {
            $e = new static($properties, $arguments);
        }

        $e->escape_char = $this->escape_char;
        $e->connection = $this->connection;

        return $e;
    }
public function expr($properties = [], $arguments = null)
    {
        // If we use DSQL Connection, then we should call expr() from there.
        // Connection->expr() will return correct, connection specific Expression class.
        if ($this->connection instanceof Connection) {
            return $this->connection->expr($properties, $arguments);
        }

        // Otherwise, connection is probably PDO and we don't know which Expression
        // class to use, so we make a smart guess :)
        if ($this instanceof Query) {
            $e = new self($properties, $arguments);
        } else {
            $e = new static($properties, $arguments);
        }

        $e->escape_char = $this->escape_char;
        $e->connection = $this->connection;

        return $e;
    }
Use this instead of "new Expression()" if you want to automatically bind
new expression to the same connection as the parent.

@param array|string $properties
@param array        $arguments

@return Expression