Skip to content
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

Merged
merged 3 commits into from
Sep 14, 2019
Merged

Docs goodies #1 #398

merged 3 commits into from
Sep 14, 2019

Conversation

Altai-man
Copy link
Contributor

  • 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

Copy link
Owner

@FCO FCO left a 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
Copy link
Owner

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

Copy link
Contributor Author

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 }
Copy link
Owner

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

Copy link
Contributor Author

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?

Copy link
Owner

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...

@FCO FCO merged commit 5ea5d85 into FCO:master Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants