'Switch connection parameters to use a new URL.
Note:
Does not reconnect!'

def switch(self, url):

    self.close()
    self.declared_entities.clear()
    self._closed = False
    self._init_params(**dict(self._initial_params, **parse_url(url)))
