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 convenience method for loading first of many by simple field equality #244

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented Jun 24, 2024

Why

In some cases it is helpful to be able to load a single entity of many matching a field equality (see the PR stacked on top of this one for example).

We already provide loadFirstByFieldEqualityConjunctionAsync but this adds another convenience method for the case where order is undefined.

How

Add method and tests.

Test Plan

Run tests.

Copy link
Member Author

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (15117fc) to head (0492011).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #244   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           72        72           
  Lines         1949      1955    +6     
  Branches       267       269    +2     
=========================================
+ Hits          1949      1955    +6     
Flag Coverage Δ
integration 100.00% <100.00%> (ø)
unittest 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wschurman wschurman force-pushed the 06-24-feat_add_convenience_method_for_loading_first_of_many_by_simple_field_equality branch from 43e7c9c to 2b13138 Compare June 25, 2024 18:13
@wschurman wschurman force-pushed the 06-24-feat_add_convenience_method_for_loading_first_of_many_by_simple_field_equality branch from 2b13138 to 0492011 Compare June 25, 2024 18:45
@wschurman wschurman closed this Jun 25, 2024
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.

1 participant