vapor / fluent-kit

Swift ORM (queries, models, and relations) for NoSQL and SQL databases
MIT License
218 stars 116 forks source link

Correctly handle @OptionalEnum properties when using ~~ and != in filter() #580

Closed gwynne closed 1 year ago

gwynne commented 1 year ago

We were incorrectly hardcoding the use of .bind query values when using the ~~ (contains) and !~ (not contains) operators with properties having optional values in Fluent filter() expressions. This appears to be the only place where this was still happening.

Fixes #579.

codecov-commenter commented 1 year ago

Codecov Report

Merging #580 (2800cd2) into main (116eebb) will increase coverage by 0.21%. The diff coverage is 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #580 +/- ## ========================================== + Coverage 46.96% 47.17% +0.21% ========================================== Files 106 106 Lines 4689 4689 ========================================== + Hits 2202 2212 +10 + Misses 2487 2477 -10 ``` | [Files Changed](https://app.codecov.io/gh/vapor/fluent-kit/pull/580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [...ces/FluentKit/Operators/ValueOperators+Array.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/580?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvT3BlcmF0b3JzL1ZhbHVlT3BlcmF0b3JzK0FycmF5LnN3aWZ0) | `100.00% <100.00%> (+33.33%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/vapor/fluent-kit/pull/580/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor)
penny-for-vapor[bot] commented 1 year ago

These changes are now available in 1.44.1