def get_metric_mapping(db):
    results = db.execute('SELECT name, id FROM metric_names').fetchall()
    return dict(results)
Gets a mapping from metric_name to metric_id.
dataset/ETHPy150Open Yelp/git-code-debt/git_code_debt/logic.py/get_metric_mapping