Skip to content

Transform * equal/unequal comparisons to NULL checks#31

Merged
nilmerg merged 1 commit into
masterfrom
transform-wildcard-only-filters-to-null-checks
Mar 12, 2021
Merged

Transform * equal/unequal comparisons to NULL checks#31
nilmerg merged 1 commit into
masterfrom
transform-wildcard-only-filters-to-null-checks

Conversation

@nilmerg
Copy link
Copy Markdown
Member

@nilmerg nilmerg commented Mar 11, 2021

We previously transformed those to TRUE and FALSE respectively with the intention to "optimize" our queries. Why not utilize this to finally implement a native way to express an IS (NOT) NULL check in our filter syntax?

This will lead to this:
name=* => name IS NOT NULL
name!=* => name IS NULL

refs Icinga/icingaweb2#1740

nilmerg added a commit to Icinga/ipl-orm that referenced this pull request Mar 11, 2021
We previously transformed those to `TRUE` and `FALSE` respectively with
the intention to "optimize" our queries. Why not utilize this to finally
implement a native way to express an `IS (NOT) NULL` check in our filter
syntax? (`name=*` => `name IS NOT NULL`, `name!=*` => `name IS NULL`)
@nilmerg nilmerg force-pushed the transform-wildcard-only-filters-to-null-checks branch from 43a5522 to 5bb7e3b Compare March 12, 2021 08:05
nilmerg added a commit to Icinga/icingaweb2 that referenced this pull request Mar 12, 2021
@nilmerg nilmerg merged commit 81568ea into master Mar 12, 2021
@nilmerg nilmerg deleted the transform-wildcard-only-filters-to-null-checks branch March 12, 2021 09:21
@lippserd lippserd added this to the v0.2.0 milestone Mar 17, 2026
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.

2 participants