def TestDele(): rh = RecordHandle(ctx.filename,struct.calcsize(ctx.format), ctx.format) try: rh.create_file() rh.open_file() except Exception ,e: rh.open_file()
def TestUpdateRc(): rcdata = [random_str(10),random_str(5),random_num(10),17] rh = RecordHandle(ctx.filename,struct.calcsize(ctx.format), ctx.format) try: rh.create_file() rh.open_file() except Exception ,e: rh.open_file()
def TestRecordChanged(): print "=====StartTestingInsertFunc======" rh = RecordHandle(ctx.filename,struct.calcsize(ctx.format), ctx.format) try: rh.create_file() rh.open_file() except Exception ,e: rh.open_file()
def TestOpenAndClose(): print '======StartTestingOpenandCloseFunc======' rh = RecordHandle(ctx.filename,struct.calcsize(ctx.format), ctx.format) try: rh.create_file() rh.open_file() print rh.fileinfo_.show() rh.close_file() except Exception, e: print e
def __create_table__(self, tablename,permission,*attrs): if tablename in self.dbtables: raise TABLEEXISTS(tablename) self.dbtables.append(tablename) self.dbattrs[tablename] = attrs """CreatFIle""" rcformat = attrs[-1][1] rchandle = RecordHandle(tablename,rcformat) rchandle.create_file() """ENDCOMMENT""" self.__update_db_file_()