Skip to content

feat(query): add isnull operator for NULL checks#528

Merged
joshdimanteto merged 3 commits intoremove-older-python-versions-#517from
add-isnull-where-filter-#527
Mar 5, 2026
Merged

feat(query): add isnull operator for NULL checks#528
joshdimanteto merged 3 commits intoremove-older-python-versions-#517from
add-isnull-where-filter-#527

Conversation

@joshdimanteto
Copy link
Copy Markdown
Contributor

This PR will close #527

Description

see #527

Testing Instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check GitHub Actions build
  • If icatdb Generator Script Consistency Test CI job fails, is this because of a deliberate change made to the script to change generated data (which isn't actually a problem) or is here an underlying issue with the changes made?
  • Review changes to test coverage
  • Does this change mean a new patch, minor or major version should be made? If so, does one of the commit messages feature fix:, feat: or BREAKING CHANGE: so a release is automatically made via GitHub Actions upon merge?
  • {more steps here}

Agile Board Tracking

#527

@joshdimanteto joshdimanteto force-pushed the add-isnull-where-filter-#527 branch from 1cf6592 to b11f9f6 Compare February 23, 2026 17:40
@joshdimanteto joshdimanteto force-pushed the add-isnull-where-filter-#527 branch 3 times, most recently from 31ca501 to f21d3b2 Compare February 24, 2026 09:58
@joshdimanteto joshdimanteto changed the base branch from main to remove-older-python-versions-#517 February 24, 2026 10:06
@joshdimanteto joshdimanteto marked this pull request as ready for review February 24, 2026 11:01
Comment thread datagateway_api/src/swagger/initialise_spec.py Outdated
Copy link
Copy Markdown

@patrick-austin patrick-austin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks OK to me but haven't had a chance to run it yet, will try and do that when I can before approving.

I note that this is not the solution that @louise-davies suggested - are you happy enough with this as is and dealing with a general solution for the discrepancy between boolean equality and is-ness (not sure what the word for that is - identity?) when/if it comes to it?

@louise-davies
Copy link
Copy Markdown
Member

Code looks OK to me but haven't had a chance to run it yet, will try and do that when I can before approving.

I note that this is not the solution that @louise-davies suggested - are you happy enough with this as is and dealing with a general solution for the discrepancy between boolean equality and is-ness (not sure what the word for that is - identity?) when/if it comes to it?

@patrick-austin Apparently JPQL doesn't support the IS operator, just specific IS NULL (and also IS EMPTY) so it had to be the specific isnull operator. What I was looking up was SQL specific 😓

Copy link
Copy Markdown

@patrick-austin patrick-austin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it on my dev ICAT and gave the expected number of results for "isnull": true and "isnull": false.

@joshdimanteto joshdimanteto merged commit 060d71a into remove-older-python-versions-#517 Mar 5, 2026
8 checks passed
@joshdimanteto joshdimanteto deleted the add-isnull-where-filter-#527 branch March 5, 2026 13:30
@joshdimanteto joshdimanteto restored the add-isnull-where-filter-#527 branch March 11, 2026 09:45
@joshdimanteto joshdimanteto deleted the add-isnull-where-filter-#527 branch March 11, 2026 09:46
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.

No where filter operator supports null checking / Add is null & is not null operators

3 participants