Skip to content

Add support to reduceRelationKeys for $and and $not #7488

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

Draft
wants to merge 2 commits into
base: alpha
Choose a base branch
from

Conversation

sadortun
Copy link
Contributor

@sadortun sadortun commented Aug 11, 2021

New Pull Request Checklist

Issue Description

Related issue: #7269

Approach

TODOs before merging

@davimacedo @mtrezza Please let me know what test to update/add.

  • Add test cases
  • Add entry to changelog

@mtrezza
Copy link
Member

mtrezza commented Aug 13, 2021

In terms of tests, you could add a test for our case, see #7269 (comment).
And since this fix considers or, and, not, one or more combinations of these in a test could be helpful.

What I usually do to simplify test writing and also test many possible combinations is using loops in a test.
In fact, I've added a permutation function getObjectKeyPermutations for that purpose to Utils.
It can create permutations of or, and, not for you and you can define these tests in one single loop.
Alternatively, you could just add a few tests which you think make sense.

@sadortun sadortun force-pushed the pr_invalidBeforeFindAndOrNot branch from 4838183 to fa112fa Compare August 16, 2021 15:53
@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #7488 (4001716) into master (c66a39f) will decrease coverage by 0.37%.
The diff coverage is 100.00%.

❗ Current head 4001716 differs from pull request most recent head 41b712a. Consider uploading reports for the commit 41b712a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7488      +/-   ##
==========================================
- Coverage   93.97%   93.59%   -0.38%     
==========================================
  Files         181      181              
  Lines       13271    13272       +1     
==========================================
- Hits        12471    12422      -49     
- Misses        800      850      +50     
Impacted Files Coverage Δ
src/Controllers/DatabaseController.js 93.71% <100.00%> (+<0.01%) ⬆️
src/Adapters/Cache/RedisCacheAdapter.js 12.28% <0.00%> (-75.44%) ⬇️
src/ParseServerRESTController.js 97.01% <0.00%> (-1.50%) ⬇️
src/Adapters/Files/GridFSBucketAdapter.js 79.50% <0.00%> (-0.82%) ⬇️
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 92.37% <0.00%> (-0.66%) ⬇️
src/RestWrite.js 93.76% <0.00%> (-0.32%) ⬇️

Continue to review full report at Codecov.

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

@sadortun sadortun marked this pull request as draft October 5, 2021 18:26
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