def dict_factory(cursor, row):
    """
    Replace the row_factory result constructor with a dictionary constructor.
  
    Args:
        cursor: (object) the sqlite3 database cursor object.
        row: (list) a result list.
    Returns:
        d: (dictionary) sqlite3 results dictionary.
    Raises:
  
    """
    d = {}
    for idx, col in enumerate(cursor.description):
        d[col[0]] = row[idx]
    return d