protected static function adapterFromDsn(string $dsn)
    {
        $vars = static::parseDsn($dsn);

        if (!class_exists($vars['className'])) {
            throw new \InvalidArgumentException('Unknown adapter');
        }

        return $vars['className']::client($vars);
    }