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

Query comprehension macro #1

Open
5 of 27 tasks
Mr-Byte opened this issue Apr 11, 2015 · 2 comments
Open
5 of 27 tasks

Query comprehension macro #1

Mr-Byte opened this issue Apr 11, 2015 · 2 comments

Comments

@Mr-Byte
Copy link
Owner

Mr-Byte commented Apr 11, 2015

The query comprehension macro needs to support the following:

  • from clauses
  • multiple from clauses
    • carry over context from multiple from clauses into other clauses
  • where clauses
  • let clauses
  • sorting clauses
    • orderby
    • ascending/descending
    • sub-sorting clauses
  • group by clauses
  • join clauses
  • into clauses
    • for selects
    • for group by
    • for join

The following extensions would be useful, but not required:

  • where let clauses (combined filter + let clause) (dropped for the time being)
  • do clauses (calls Iterator::inspect)
  • alternative end clauses
    • max by
    • min by
    • first
    • single
    • skip/take
      • into clause
    • partition by
      • into clause
    • fold/aggregate
    • where all
    • where any
    • collect
    • foreach (experimental design idea)
@Mr-Byte
Copy link
Owner Author

Mr-Byte commented Apr 12, 2015

The way where let clauses is currently implemented requires each clause to be implemented twice. I need to do some bench marking to compare adding the match with not adding the match to clauses that don't need to have it. If there's negligible performance difference, I'll probably just include the match in every clause regardless of need and drop the current implementation of only switching over to the match when a where let clause first appears.

@Mr-Byte
Copy link
Owner Author

Mr-Byte commented Apr 17, 2015

In the interest of progress I think I'll cut the where-let clauses from initial phases. It's proving to be difficulty to be maintainable.

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

No branches or pull requests

1 participant