def rename_worksheet(self, worksheet, name): ''' Update the given worksheet's name. ''' worksheet.name = name worksheet.validate() with self.engine.begin() as connection: connection.execute(cl_worksheet.update().where( cl_worksheet.c.uuid == worksheet.uuid ).values({'name': name}))
def chown_worksheet(self, worksheet, owner_id): ''' Update the given worksheet's owner_id. ''' worksheet.owner_id = owner_id worksheet.validate() with self.engine.begin() as connection: connection.execute(cl_worksheet.update().where( cl_worksheet.c.uuid == worksheet.uuid ).values({'owner_id': owner_id}))