# Pastebin jk9eqzHy $ perl6 -Ilib -e ' use Red; model M is table { has Str $.a is column; has Bool $.b is column; has Int $.c is column } my $*RED-DB = database "SQLite"; M.^create-table; M.^all.map: { next unless .b; .c ?? .c !! .a } ' {{mmm.c => False, mmm.b => False} => next, {mmm.c => False, mmm.b => True} => mmm.a, {mmm.c => True, mmm.b => True} => mmm.c}