示例#1
0
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()
示例#2
0
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()
示例#3
0
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()
示例#4
0
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
示例#5
0
	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_()