(self, tables)
| 588 | conf.dumper.dbTableValues(data) |
| 589 | |
| 590 | def dumpFoundTables(self, tables): |
| 591 | message = "do you want to dump found table(s) entries? [Y/n] " |
| 592 | |
| 593 | if not readInput(message, default='Y', boolean=True): |
| 594 | return |
| 595 | |
| 596 | dumpFromDbs = [] |
| 597 | message = "which database(s)?\n[a]ll (default)\n" |
| 598 | |
| 599 | for db, tablesList in tables.items(): |
| 600 | if tablesList: |
| 601 | message += "[%s]\n" % unsafeSQLIdentificatorNaming(db) |
| 602 | |
| 603 | message += "[q]uit" |
| 604 | choice = readInput(message, default='a') |
| 605 | |
| 606 | if not choice or choice.lower() == 'a': |
| 607 | dumpFromDbs = list(tables.keys()) |
| 608 | elif choice.lower() == 'q': |
| 609 | return |
| 610 | else: |
| 611 | dumpFromDbs = choice.replace(" ", "").split(',') |
| 612 | |
| 613 | for db, tablesList in tables.items(): |
| 614 | if db not in dumpFromDbs or not tablesList: |
| 615 | continue |
| 616 | |
| 617 | conf.db = db |
| 618 | dumpFromTbls = [] |
| 619 | message = "which table(s) of database '%s'?\n" % unsafeSQLIdentificatorNaming(db) |
| 620 | message += "[a]ll (default)\n" |
| 621 | |
| 622 | for tbl in tablesList: |
| 623 | message += "[%s]\n" % unsafeSQLIdentificatorNaming(tbl) |
| 624 | |
| 625 | message += "[s]kip\n" |
| 626 | message += "[q]uit" |
| 627 | choice = readInput(message, default='a') |
| 628 | |
| 629 | if not choice or choice.lower() == 'a': |
| 630 | dumpFromTbls = tablesList |
| 631 | elif choice.lower() == 's': |
| 632 | continue |
| 633 | elif choice.lower() == 'q': |
| 634 | return |
| 635 | else: |
| 636 | dumpFromTbls = choice.replace(" ", "").split(',') |
| 637 | |
| 638 | for table in dumpFromTbls: |
| 639 | conf.tbl = table |
| 640 | kb.data.cachedColumns = {} |
| 641 | kb.data.dumpedTable = {} |
| 642 | |
| 643 | data = self.dumpTable() |
| 644 | |
| 645 | if data: |
| 646 | conf.dumper.dbTableValues(data) |
no test coverage detected