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

Method RenderHeader

tools/shell/shell_renderer.cpp:699–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

697 }
698
699 void RenderHeader(PrintStream &out, ResultMetadata &result) override {
700 auto column_count = result.ColumnCount();
701
702 out.Print("\\begin{tabular}{|");
703 for (idx_t i = 0; i < column_count; i++) {
704 if (state.ColumnTypeIsInteger(result.type_names[i].c_str())) {
705 out.Print("r");
706 } else {
707 out.Print("l");
708 }
709 }
710 out.Print("|}\n");
711 out.Print("\\hline\n");
712 for (idx_t c = 0; c < column_count; c++) {
713 out.RenderAlignedValue(result.column_names[c], column_width[c]);
714 out.Print(c == column_count - 1 ? GetRowSeparator() : GetColumnSeparator());
715 }
716 out.Print("\\hline\n");
717 }
718
719 void RenderFooter(PrintStream &out, ResultMetadata &) override {
720 out.Print("\\hline\n");

Callers

nothing calls this directly

Calls 5

ColumnTypeIsIntegerMethod · 0.80
c_strMethod · 0.80
RenderAlignedValueMethod · 0.80
ColumnCountMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected