| 133 | self.connMap[host + '/' + db] = create_engine('mysql+pymysql://' + name + ':' + password + '@' + host + '/' + db) |
| 134 | |
| 135 | def get_table_columns(self): |
| 136 | for jdbc in self.jdbcList: |
| 137 | # self.connMap[jdbc] = create_engine('mysql+pymysql://root:password@localhost/test_db') |
| 138 | # self.connMap[jdbc] = create_engine('mysql+pymysql://' + self.userNames + ':' + |
| 139 | # self.passwords + '@' + jdbc) |
| 140 | inspector = inspect(self.connMap[jdbc]) |
| 141 | tables = inspector.get_table_names() |
| 142 | self.tableList[jdbc] = [table for table in tables] |
| 143 | for table in tables: |
| 144 | self.columnsList[jdbc + "_" + table] = [column for column in inspector.get_columns(table)] |
| 145 | |
| 146 | def process_result(self, sql, result): |
| 147 | operator_type = get_db_operation_class(sql) |