-
-
Save FCO/21e3a2471b45ff93c2811d7093ab36df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Red; | |
model Person { | |
has UInt $.id is serial; | |
has Str $.name is column; | |
has Str $.email is column{ :nullable }; | |
} | |
my $*RED-DB = database "SQLite"; | |
Person.^create-table; | |
Person.^create: :name<Fernando>, :email<fco@aco.com>; | |
Person.^create: :name<Aline>, :email<aja@aco.com>; | |
Person.^create: :name<Fernanda>; | |
Person.^create: :name<Sophia>; | |
.say for Person.^all.grep(*.email.defined).map: *.name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment