def get(self,fid): db = Models() row = db(db.files.fid == fid).select().first() return row
def insert(self,fname,fcontent,limit,fid): db = Models() db.files.insert(fname=fname,fcontent=fcontent,limit=limit,fid=fid) db.commit()
def delete(self,fid): db = Models() db(db.files.fid == fid).delete() db.commit() return True
def updateLimit(self,fid,limit): db = Models() db(db.files.fid == fid).update(limit=limit) db.commit() return True
def insert(self,fname,limit,fid,status): db = Models() db.files.insert(fname=fname,limit=limit,fid=fid,status=status) db.commit()
def updateStatus(self,fid): db = Models() db(db.files.fid == fid).update(status=True) db.commit() return True