示例#1
0
 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}))
示例#2
0
 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}))