# Pastebin Uc3VELXi $ perl6 -MRed -e ' model Bla { has UInt $.id is id; has Str $.bla is column{ :nullable }; } my $*RED-DB = database "SQLite"; Bla.^create-table; for (|, Nil).roll(10) { Bla.^create: :bla($_) } say formatter Bla.^all; sub formatter(Red::ResultSeq:D $rs --> Str ) { my @cols = $rs.of.^attributes.grep(Red::Attr::Column).map( -> $c { $c.name.substr(2) }); my $str = @cols.join("\t\t|"); $str ~= "\n" ~ ( "-" x 50 ) ~ "\n"; for $rs -> $row { $str ~= @cols.map( -> $n { $row."$n"() // "" }).join("\t\t|") ~ "\n"; } $str; } ' id |bla -------------------------------------------------- 1 |b 2 |a 3 | 4 |b 5 |a 6 | 7 |c 8 |b 9 | 10 |