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

Implement ANY and ALL #227

Merged
merged 9 commits into from
Jan 20, 2025
Merged

Implement ANY and ALL #227

merged 9 commits into from
Jan 20, 2025

Conversation

dnicolodi
Copy link
Collaborator

No description provided.

@dnicolodi dnicolodi force-pushed the arrays2 branch 15 times, most recently from 3179422 to 953daef Compare January 20, 2025 16:30
Add "accounts" to the "entries", "postings", and "transactions" tables.
This deviates from the "||" operator used in standard SQL, but it is
both easier to implement and more natural in a Python environment.
It works like the regular expression match operator "~" but with the
arguments in the reversed order (to make it more useful in combination
with the ALL and ANY operators). Furthermore, it does not default to
case insensitive matching. The regular expression inline flag (?i) can
be used to perform case insensitive matching.

This does not follow the SQL standard nor there is precedent for it in
any SQL-like query language that I know of. The operator name is not
set in stone and can be adapted to any prior art.
The AST is rewritten to contain an explicit reference to the accounts
column. This removes the need to pass the current row object (which is
of the expected kind only when iterating the postings or entries
tables) to the function evaluation. This removes the last function
implementation that uses the current row.
@dnicolodi dnicolodi merged commit 628d547 into beancount:master Jan 20, 2025
21 checks passed
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.

1 participant