def get_db_ps1(self, *args, **kwargs):
        if not self.connected:
            return ''
        if self.nickname:
            return " " + self.nickname
        host = self.engine.url.host or ''

        if '.' in host:
            host = host.split('.')[0]
        host = host[:15]  # don't like long hostnames
        db = '?'
        if self.engine.url.database:
            db = self.engine.url.database[:15]
        if host:
            url = "%s/%s" % (host, db)
        else:
            url = db
        return " " + url
Return current host/db for use in ipython's prompt PS1.
dataset/ETHPy150Open jaysw/ipydb/ipydb/plugin.py/SqlPlugin.get_db_ps1