# Pastebin 7mozd53M % perl6 -I. -e ' use Red ; model Bla is table { has UInt $.id is serial; has Str $.name is column } red-defaults pg => \("Pg", :default), sqlite => \("SQLite"); red-do "sqlite" => { Bla.^create-table: :if-not-exists }; red-do "sqlite" => { red-tap "dup", -> $record { $record.^save: :insert } }, "pg" => { red-emit "dup", $_ for Bla.^all }, ; red-do :with, { say "sqlite => ", $_ for Bla.^all.batch(3).head } red-do :with, { say "pg => ", $_ for Bla.^all.batch(3).head } ' sqlite => Bla.new(id => 1, name => "bla") sqlite => Bla.new(id => 2, name => "ble") sqlite => Bla.new(id => 3, name => "bli") pg => Bla.new(id => 1, name => "bla") pg => Bla.new(id => 2, name => "ble") pg => Bla.new(id => 3, name => "bli")