public function setCharset($charset)
    {
        if ($this->config->getCharset() !== $charset) {
            $this->config->setCharset($charset);
            if ($this->connection) {
                $this->query('SET NAMES ?', [$charset]);
            }
        }

        return $this;
    }