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

MG-72 - Fix NamedQueryContext not returning sql.ErrNoRows #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nnpvaan
Copy link

@nnpvaan nnpvaan commented Feb 26, 2025

What type of PR is this?

This is a bug fix because it fixes the following issue: #72

What does this do?

  • Fixes incorrect error handling when NamedQueryContext does not return sql.ErrNoRows.
  • Ensures row.Next() is checked before calling StructScan().
  • Returns repoerr.ErrNotFound wrapped with sql.ErrNoRows when there are no rows.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No (Existing tests should already cover this behavior. If needed, I can add specific tests.)

Did you document any new/modified feature?

No (Bug fix, no new documentation needed.)

Notes

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.35%. Comparing base (9c15ba6) to head (9154595).
Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #73       +/-   ##
===========================================
+ Coverage   30.12%   56.35%   +26.22%     
===========================================
  Files          89       19       -70     
  Lines       13198     2889    -10309     
===========================================
- Hits         3976     1628     -2348     
+ Misses       8752     1046     -7706     
+ Partials      470      215      -255     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dborovcanin dborovcanin changed the title Fix NamedQueryContext not returning sql.ErrNoRows MG-72 - Fix NamedQueryContext not returning sql.ErrNoRows Feb 26, 2025
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.

Bug: NamedQueryContext does not return sql.ErrNoRows, causing incorrect error handling
2 participants