MCPcopy Create free account
hub / github.com/duckdb/duckdb / RenderHeader

Method RenderHeader

tools/shell/shell_renderer.cpp:434–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432 }
433
434 void RenderHeader(PrintStream &out, ResultMetadata &result) override {
435 if (!show_header) {
436 return;
437 }
438 auto column_count = result.ColumnCount();
439 for (idx_t c = 0; c < column_count; c++) {
440 TextAlignment alignment = right_align[c] ? TextAlignment::RIGHT : TextAlignment::LEFT;
441 out.RenderAlignedValue(result.column_names[c], column_width[c], alignment);
442 out.Print(c == column_count - 1 ? "\n" : " ");
443 }
444 for (idx_t i = 0; i < column_count; i++) {
445 out.PrintDashes(column_width[i]);
446 out.Print(i == column_count - 1 ? "\n" : " ");
447 }
448 }
449
450 const char *GetColumnSeparator() override {
451 return " ";

Callers

nothing calls this directly

Calls 4

RenderAlignedValueMethod · 0.80
PrintDashesMethod · 0.80
ColumnCountMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected