14 using char_t = std::remove_cvref_t<
decltype(out)>::char_type;
15 auto sizes = std::vector<size_t>(in.
columns.size());
16 auto cols = in.
columns | std::ranges::to<std::vector<variant>>();
17 auto line = std::vector<variant>(cols.size());
18 manip{sizes, cols}.resize(out);
20 manip{sizes, row}.resize(out);
22 << std::setfill<char_t>(
' ') << manip{sizes, cols}
23 << std::setfill<char_t>(
'-') << manip{sizes, line}
24 << std::setfill<char_t>(
' ');
26 out << manip{sizes, row};
37 auto suf = col.srid > 0 ? col.srid : col.length > 0 ? col.length : 0;
40 suf > 0 ? concat(col.type_name,
":", suf) : col.type_name,
44 auto key = std::ranges::begin(idx);
45 auto spatial = std::ranges::any_of(in.
columns, [&](
auto& col) {
46 return col.has_coord_sys() && col.column_name == key->column_name;
48 rs.columns.push_back(concat(
49 key->partial ?
"part:"
50 : key->primary ?
"pk:"
52 : key->unique ?
"uniq:"
54 std::ranges::size(idx)));
55 for (
auto [col, row] : std::views::zip(in.
columns, rs.rows)) {
56 key = std::ranges::find(
59 key == std::ranges::end(idx)
61 :
variant{key->ordinal * (key->descending ? -1 : 1)});