Example #1
0
			class Person(metaclass=dbclass.DBClass):
				personal_name = dbclass.DBValue(str)
				full_name = dbclass.DBValue(str)

				def __init__(self, personal_name, full_name=None):
					# __init__ should not be called when loading
					assert False
Example #2
0
			class Person(DBTestObject, metaclass=dbclass.DBClass):
				personal_name = dbclass.DBValue(str)
				full_name = dbclass.DBValue(str)

				def __init__(self, personal_name, full_name=None):
					self.personal_name = personal_name
					if full_name is None:
						full_name = personal_name
					self.full_name = full_name
Example #3
0
			class Person(metaclass=dbclass.DBClass):
				personal_name = dbclass.DBValue(str)
Example #4
0
			class Person(metaclass=dbclass.DBClass):
				personal_name = dbclass.DBValue(str)
				def __init__(self, personal_name, full_name=None):
					self.personal_name = personal_name
Example #5
0
			class ChildClass(ParentClass):
				data2 = dbclass.DBValue(int)
				def __init__(self, data1, data2):
					self.data2 = data2
					ParentClass.__init__(self, data1)
Example #6
0
			class ParentClass(DBTestObject, metaclass=dbclass.DBClass):
				data1 = dbclass.DBValue(str)
				def __init__(self, data1):
					self.data1 = data1
Example #7
0
			class IntWrapper(DBTestObject, metaclass=dbclass.DBClass):
				data = dbclass.DBValue(int)
				def __init__(self, data):
					self.data = data
Example #8
0
			class UnicodeData(DBTestObject, metaclass=dbclass.DBClass):
				data = dbclass.DBValue(str)
				def __init__(self, data):
					self.data = data
Example #9
0
			class DoesNotExist(DBTestObject, metaclass=dbclass.DBClass):
				improbability = dbclass.DBValue(int)