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

Allow using and, or, and not in expressions #3993

Merged
merged 1 commit into from Mar 5, 2024

Conversation

dominiklohmann
Copy link
Member

This change makes it so that X or not (Y and Z) is equivalent to X || !(Y && Z). Since we want to move to that anyways with TQL2 and I'm constantly mistyping this already, I figured it'd make sense to introduce this four line diff that's entirely backwards-compatible to allow using the new tokens for conjunctions, disjunctions, and negations already.

This also removes the undocumented and untested [+, [-, +], and -] relational operators that were aliases for in, not in, ni, and not ni, respectively. It's odd when you find code after over four years of contributing to a project that's just silently been there and that you've never seen. I doubt anyone is going to miss them.

@dominiklohmann dominiklohmann added language Tenzir Query Language (TQL) improvement An incremental enhancement of an existing feature labels Mar 1, 2024
This change makes it so that `X or not (Y and Z)` is equivalent to `X ||
!(Y && Z)`. Since we want to move to that anyways with TQL2 and I'm
constantly mistyping this already, I figured it'd make sense to
introduce this four line diff that's entirely backwards-compatible to
allow using the new tokens for conjunctions, disjunctions, and negations
already.

This also removes the undocumented and untested `[+`, `[-`, `+]`, and
`-]` relational operators that were aliases for `in`, `not in`, `ni`,
and `not ni`, respectively. It's odd when you find code after over four
years of contributing to a project that's just silently been there and
that you've never seen. I doubt anyone is going to miss them.
@dominiklohmann dominiklohmann force-pushed the topic/alternative-tokens-old-exprs branch from 5a10a76 to 03e265d Compare March 5, 2024 08:21
@dominiklohmann dominiklohmann merged commit b82025d into main Mar 5, 2024
58 checks passed
@dominiklohmann dominiklohmann deleted the topic/alternative-tokens-old-exprs branch March 5, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An incremental enhancement of an existing feature language Tenzir Query Language (TQL)
Projects
None yet
2 participants