示例#1
0
文件: table.py 项目: jbgage/Portfolio
 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)))
示例#2
0
 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)))
示例#3
0
文件: drop.py 项目: jbgage/Portfolio
 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)))