summaryrefslogtreecommitdiff
path: root/alembic/testing/compat.py
blob: e0af6a2cc2db324bd8f0cadd3be38860ff853ea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
def get_url_driver_name(url):
    if '+' not in url.drivername:
        return url.get_dialect().driver
    else:
        return url.drivername.split('+')[1]


def get_url_backend_name(url):
    if '+' not in url.drivername:
        return url.drivername
    else:
        return url.drivername.split('+')[0]