| 64 | } |
| 65 | |
| 66 | std::string MaterializedQueryResult::toString() const { |
| 67 | checkDatabaseClosedOrThrow(); |
| 68 | if (!isSuccess()) { |
| 69 | return errMsg; |
| 70 | } |
| 71 | std::string result; |
| 72 | // print header |
| 73 | for (auto i = 0u; i < columnNames.size(); ++i) { |
| 74 | if (i != 0) { |
| 75 | result += "|"; |
| 76 | } |
| 77 | result += columnNames[i]; |
| 78 | } |
| 79 | result += "\n"; |
| 80 | auto tuple_ = FlatTuple(this->columnTypes); |
| 81 | auto iterator_ = FactorizedTableIterator(*table); |
| 82 | while (iterator_.hasNext()) { |
| 83 | iterator_.getNext(tuple_); |
| 84 | result += tuple_.toString(); |
| 85 | } |
| 86 | return result; |
| 87 | } |
| 88 | |
| 89 | bool MaterializedQueryResult::hasNextArrowChunk() { |
| 90 | return hasNext(); |
nothing calls this directly
no test coverage detected