public static function createFromDSN($dsn)
    {
        if (is_string($dsn)) {
            $parsed = self::parseDSN($dsn);
        } else {
            $parsed = $dsn;
        }

        $connection = DriverManager::getConnection($parsed);

        if ($parsed['driver'] === 'pdo_sqlite') {
            return new ConnectionHandler\SqliteConnectionHandler($connection);
        }

        if ($parsed['driver'] === 'pdo_pgsql') {
            return new ConnectionHandler\PostgresConnectionHandler($connection);
        }

        return new self($connection);
    }