vapor / fluent-kit

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

Add possibility of nested eager load builder to throw #574

Closed Frizlab closed 1 year ago

Frizlab commented 1 year ago

This PR adds the possibility of throwing inside the block that adds nested eager loaders. I need this because I add eager loading as needed depending on fields (user input), recursively, and I don’t know before it’s too late whether my fields are valid.

As the with functions that are modified are marked as rethrows, this should have no impact on existing code and should not require a major version bump.

codecov-commenter commented 1 year ago

Codecov Report

Merging #574 (b169408) into main (cee27b8) will not change coverage. The diff coverage is 0.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #574 +/- ## ======================================= Coverage 47.63% 47.63% ======================================= Files 106 106 Lines 4702 4702 ======================================= Hits 2240 2240 Misses 2462 2462 ``` | [Files Changed](https://app.codecov.io/gh/vapor/fluent-kit/pull/574?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor) | Coverage Δ | | |---|---|---| | [...uentKit/Query/Builder/QueryBuilder+EagerLoad.swift](https://app.codecov.io/gh/vapor/fluent-kit/pull/574?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vapor#diff-U291cmNlcy9GbHVlbnRLaXQvUXVlcnkvQnVpbGRlci9RdWVyeUJ1aWxkZXIrRWFnZXJMb2FkLnN3aWZ0) | `0.00% <0.00%> (ø)` | |
penny-for-vapor[bot] commented 1 year ago

These changes are now available in 1.43.2