MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / toString

Method toString

src/main/query_result/materialized_query_result.cpp:66–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66std::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
89bool MaterializedQueryResult::hasNextArrowChunk() {
90 return hasNext();

Callers

nothing calls this directly

Calls 5

FlatTupleClass · 0.50
sizeMethod · 0.45
hasNextMethod · 0.45
getNextMethod · 0.45

Tested by

no test coverage detected