budibase icon indicating copy to clipboard operation
budibase copied to clipboard

Support ObjectId in MongoDB operators

Open melohagan opened this issue 2 years ago • 2 comments

Description

Fix to recognise object ids inside MongoDB operators such as $eq

Addresses:

  • https://github.com/Budibase/budibase/issues/6778
  • https://github.com/Budibase/budibase/issues/7079
  • https://github.com/Budibase/budibase/discussions/7056

melohagan avatar Jul 26 '22 10:07 melohagan

Codecov Report

Merging #6895 (f7c816b) into develop (dab6da7) will increase coverage by 0.55%. The diff coverage is n/a.

:exclamation: Current head f7c816b differs from pull request most recent head 9ce34aa. Consider uploading reports for the commit 9ce34aa to get more accurate results

@@             Coverage Diff             @@
##           develop    #6895      +/-   ##
===========================================
+ Coverage    66.91%   67.47%   +0.55%     
===========================================
  Files          125      125              
  Lines         4087     4092       +5     
  Branches       638      638              
===========================================
+ Hits          2735     2761      +26     
+ Misses         963      939      -24     
- Partials       389      392       +3     
Impacted Files Coverage Δ
packages/server/src/api/controllers/row/utils.js 63.63% <0.00%> (+1.37%) :arrow_up:
...s/server/src/api/controllers/row/internalSearch.js 70.21% <0.00%> (+11.83%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov-commenter avatar Aug 08 '22 20:08 codecov-commenter

@Rory-Powell I realised that the regex wasn't handling scenarios where there were braces {} within strings (double quotes). I removed the regex and did it programmatically because it was starting to get too complicated for my regex skills. Added a unit test to cover this scenario as well!

melohagan avatar Aug 09 '22 16:08 melohagan