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

feat: Add _not operator #1631

Merged

Conversation

fredcarle
Copy link
Collaborator

Relevant issue(s)

Resolves #1542

Description

This PR add the _not operator as an option for filters in graphql queries.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

make test

Specify the platform(s) on which this was tested:

  • MacOS

@fredcarle fredcarle added feature New feature or request area/query Related to the query component area/mapper Related to the mapper components labels Jul 12, 2023
@fredcarle fredcarle requested a review from a team July 12, 2023 21:55
@fredcarle fredcarle self-assigned this Jul 12, 2023
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05 🎉

Comparison is base (10dc477) 75.60% compared to head (d35d62e) 75.64%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1631      +/-   ##
===========================================
+ Coverage    75.60%   75.64%   +0.05%     
===========================================
  Files          198      199       +1     
  Lines        20756    20774      +18     
===========================================
+ Hits         15691    15714      +23     
+ Misses        3994     3987       -7     
- Partials      1071     1073       +2     
Flag Coverage Δ
all-tests 75.64% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
connor/connor.go 100.00% <100.00%> (+6.67%) ⬆️
connor/not.go 100.00% <100.00%> (ø)
planner/mapper/mapper.go 87.24% <100.00%> (+0.09%) ⬆️
planner/mapper/targetable.go 82.89% <100.00%> (+0.70%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10dc477...d35d62e. Read the comment docs.

connor/not.go Outdated Show resolved Hide resolved
@fredcarle fredcarle force-pushed the fredcarle/feat/I1542-not-operator branch from 4511ebe to 208454c Compare July 13, 2023 13:38
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

Production code looks good, I think more tests are required though.

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for taking care of this. I think some more tests would be nice, but not a blocker for me and the implementation seems straight forward.

connor/not_test.go Outdated Show resolved Hide resolved
connor/not.go Outdated Show resolved Hide resolved
Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

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

LGTM, cheers Fred

@fredcarle fredcarle merged commit 9611024 into sourcenetwork:develop Jul 13, 2023
10 checks passed
@fredcarle fredcarle deleted the fredcarle/feat/I1542-not-operator branch July 13, 2023 21:31
@fredcarle fredcarle added this to the DefraDB v0.6 milestone Jul 17, 2023
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#1542 

## Description

This PR add the `_not` operator as an option for filters in graphql
queries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mapper Related to the mapper components area/query Related to the query component feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No tests for _not operator in filters.
3 participants