示例#1
0
 def check2(cls, colNameL, colTypeL):
     util.checkAndThrow(isinstance(colNameL, list))
     util.checkAndThrow(isinstance(colTypeL, list))
     util.checkAndThrow(len(colNameL), len(colTypeL))
     for colName in colNameL:
         util.checkAndThrow(isinstance(colName, str))
     for colType in colTypeL:
         util.checkAndThrow(isinstance(colType, ColumnType))
     return True
示例#2
0
    def valid(self):
        """
        return :: bool
        throw :: AssertionError

        """
        util.checkAndThrow(isinstance(self.name(), str))
        util.checkAndThrow(len(self.name()) > 0)
        util.checkAndThrow(isinstance(self.type(), ColumnType))
        return True
示例#3
0
 def check1(cls, schemaEntryL):
     util.checkAndThrow(isinstance(schemaEntryL, list))
     for entry in schemaEntryL:
         util.checkAndThrow(entry is not None)
         entry.valid()
     return True