import sqlite3


def map_row_to_dict(cursor: sqlite3.Cursor, row_data):
    """
    Just a neat function that converts cursor tuple-y data into dictionary
    Used by SQLite module to map results into a dictionary

    :param cursor: The cursor after a query is executed
    :param row_data: The row data after the query is executed
    :returns: A dictionary of the query data in the form of {column_name: row_data}
    """
    d = {}
    for idx, col in enumerate(cursor.description):
        d[col[0]] = row_data[idx]
    return d