<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def update(uid, post_data):
        '''
        Update the category.
        '''
        raw_rec = TabTag.get(TabTag.uid == uid)
        entry = TabTag.update(
            name=post_data['name'] if 'name' in post_data else raw_rec.name,
            slug=post_data['slug'] if 'slug' in post_data else raw_rec.slug,
            order=post_data['order'] if 'order' in post_data else raw_rec.order,
            kind=post_data['kind'] if 'kind' in post_data else raw_rec.kind,
            pid=post_data['pid'],
        ).where(TabTag.uid == uid)
        entry.execute()