()
| 100 | } |
| 101 | |
| 102 | public void execute() throws DbException, TransactionAbortedException { |
| 103 | TupleDesc td = this.getOutputTupleDesc(); |
| 104 | |
| 105 | StringBuilder names = new StringBuilder(); |
| 106 | for (int i = 0; i < td.numFields(); i++) { |
| 107 | names.append(td.getFieldName(i)).append("\t"); |
| 108 | } |
| 109 | System.out.println(names); |
| 110 | for (int i = 0; i < names.length() + td.numFields() * 4; i++) { |
| 111 | System.out.print("-"); |
| 112 | } |
| 113 | System.out.println(); |
| 114 | |
| 115 | this.start(); |
| 116 | int cnt = 0; |
| 117 | while (this.hasNext()) { |
| 118 | Tuple tup = this.next(); |
| 119 | System.out.println(tup); |
| 120 | cnt++; |
| 121 | } |
| 122 | System.out.println("\n " + cnt + " rows."); |
| 123 | this.close(); |
| 124 | } |
| 125 | } |
no test coverage detected