def listOfTables(self): ''' This method converts the JSON-derived values for the list of tables into a list of model.TableModel objects @return: list ''' table_model_list = [] try: for tableObj in self.__configFileObj.sqlTables(): tablemodel = TableModel() tablemodel.tableName = tableObj['name'] tablemodel.fieldsArray = self.listOfTableField(tableObj['fields']) table_model_list.append(tablemodel) except IOError, ioerr: self.__logger.error( '***** SqlTableScriptGenerator.listOfTables: IO Error occured - {0}'.format(str(ioerr)))
def listOfTables(self): ''' This method converts the JSON-derived values for the list of tables into a list of model.TableModel objects @return: list ''' table_model_list = [] try: for tableObj in self.__configFileObj.sqlTables(): tablemodel = TableModel() tablemodel.tableName = tableObj['name'] tablemodel.fieldsArray = self.listOfTableField( tableObj['fields']) table_model_list.append(tablemodel) except IOError, ioerr: self.__logger.error( '***** SqlTableScriptGenerator.listOfTables: IO Error occured - {0}' .format(str(ioerr)))
def listOfTables(self): ''' This method converts the JSON dictionary of SQL TABLE properties into a list of model.TableModel objects. @return: list ''' table_model_list = [] try: for tableObj in self.__configFileObj.sqlTables(): tablemodel = TableModel() tablemodel.tableName = tableObj['name'] tablemodel.fieldsArray = self.listOfTableField( tableObj['fields']) table_model_list.append(tablemodel) except IOError, ioerr: self.__logger.error( '***** DropTableViewGenerator.listOfTables: IO Error occured - {0}' .format(str(ioerr)))