def update_category_severity_mapping(conn, severity_id, category_name, group_name):
    if (is_conn(conn) and is_int(severity_id) and is_str(category_name) and is_str(group_name)):
        cursor = conn.cursor()
        cursor.execute('UPDATE Queries             SET Queries.Severity = ?             FROM dbo.Categories Categories             JOIN dbo.CategoryForQuery CategoriesForQuery                 ON Categories.Id=CategoriesForQuery.CategoryId             JOIN dbo.Query Queries                 ON CategoriesForQuery.QueryId=Queries.QueryId             JOIN dbo.CategoriesTypes CategoriesTypes                 ON Categories.CategoryType = CategoriesTypes.Id             WHERE Categories.CategoryName = ?             AND CategoriesTypes.TypeName = ?', (severity_id, group_name, category_name))
        conn.commit()
        cursor.execute('UPDATE QueryVersions             SET QueryVersions.Severity = ?             FROM dbo.Categories Categories             JOIN dbo.CategoryForQuery CategoriesForQuery                 ON Categories.Id=CategoriesForQuery.CategoryId             JOIN dbo.QueryVersion QueryVersions                 ON CategoriesForQuery.QueryId=QueryVersions.QueryId             JOIN dbo.CategoriesTypes CategoriesTypes                 ON Categories.CategoryType = CategoriesTypes.Id             WHERE Categories.CategoryName = ?             AND CategoriesTypes.TypeName = ?', (severity_id, group_name, category_name))
        conn.commit()
        print('Updating Severity Mapping for Severity', severity_id, '-', group_name, '-', category_name)
    else:
        raise AttributeError('Connection object was not provided')
def update_category_severity_mapping(conn, severity_id, category_name, group_name):
    if (is_conn(conn) and is_int(severity_id) and is_str(category_name) and is_str(group_name)):
        cursor = conn.cursor()
        cursor.execute('UPDATE Queries             SET Queries.Severity = ?             FROM dbo.Categories Categories             JOIN dbo.CategoryForQuery CategoriesForQuery                 ON Categories.Id=CategoriesForQuery.CategoryId             JOIN dbo.Query Queries                 ON CategoriesForQuery.QueryId=Queries.QueryId             JOIN dbo.CategoriesTypes CategoriesTypes                 ON Categories.CategoryType = CategoriesTypes.Id             WHERE Categories.CategoryName = ?             AND CategoriesTypes.TypeName = ?', (severity_id, group_name, category_name))
        conn.commit()
        cursor.execute('UPDATE QueryVersions             SET QueryVersions.Severity = ?             FROM dbo.Categories Categories             JOIN dbo.CategoryForQuery CategoriesForQuery                 ON Categories.Id=CategoriesForQuery.CategoryId             JOIN dbo.QueryVersion QueryVersions                 ON CategoriesForQuery.QueryId=QueryVersions.QueryId             JOIN dbo.CategoriesTypes CategoriesTypes                 ON Categories.CategoryType = CategoriesTypes.Id             WHERE Categories.CategoryName = ?             AND CategoriesTypes.TypeName = ?', (severity_id, group_name, category_name))
        conn.commit()
        print('Updating Severity Mapping for Severity', severity_id, '-', group_name, '-', category_name)
    else:
        raise AttributeError('Connection object was not provided')