-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs goodies #1 #398
Docs goodies #1 #398
Conversation
Altai-man
commented
Sep 14, 2019
- Replaces front page of doc site with introduction, which is where it, I think, belongs
- Adds a very simple introduction tutorial
- Adds some missing dots for inline documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! I've commented just 2 points... I'll merge it anyway.
Thanks!
Lets add some more records: | ||
|
||
```perl6 | ||
Person.new(name => "Paul"); # Method call with parentheses and an arrow pair |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This to lines are not inserting on the database... they are just creating objects. It should call .^save
or have used .^create
to store on the database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, nice catch!
To express the query above, calls to `grep` can be combined: | ||
|
||
```perl6 | ||
for Person.^all.grep(*.name.starts-with('Jo')).grep(*.id == 2) -> $person { say $person } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use
Person.^all.grep({ .name.starts-with('Jo') && .id == 2 })
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also tried .grep(*.name.starts-with('Jo') && *.id == 2)
, but it transformed only the left side of the condition, is it a known bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Altai-man, no... that would generate a block that would receive 2 args... that’s the problem...