minder icon indicating copy to clipboard operation
minder copied to clipboard

Two fixes for GetEntityByName

Open jhrozek opened this issue 1 year ago • 3 comments

Summary

  • Add the sqlc-generating comment to GetEntityByName - We forgot the comment that makes sqlc generate the code.
  • Do not lowercase when searching an entity by name - I don't think lowercasing is the responsibility of the database layer, it should be the provider who should return the entity information lowercased through the naming interface.

Change Type

  • [x] Bug fix (resolves an issue without affecting existing features)
  • [ ] Feature (adds new functionality without breaking changes)
  • [ ] Breaking change (may impact existing functionalities or require documentation updates)
  • [ ] Documentation (updates or additions to documentation)
  • [ ] Refactoring or test improvements (no bug fixes or new functionality)

Testing

in follow up code, right now the code is unused

Review Checklist:

  • [x] Reviewed my own code for quality and clarity.
  • [ ] Added comments to complex or tricky code sections.
  • [ ] Updated any affected documentation.
  • [ ] Included tests that validate the fix or feature.
  • [ ] Checked that related changes are merged.

jhrozek avatar Aug 19 '24 14:08 jhrozek

@jhrozek - it seems there are some linting issues 👍

rdimitrov avatar Aug 19 '24 15:08 rdimitrov

Looks like you need to re-run make gen to recreate the DB mocks.

dmjb avatar Aug 19 '24 15:08 dmjb

Coverage Status

coverage: 53.838%. remained the same when pulling b464b94949011de4e7debfb355716cc2b913c52f on jhrozek:fix_sqlc_comment into d63522d8c8487b6e2ad68d0a3b0e2ba7e4ca7105 on stacklok:main.

coveralls avatar Aug 19 '24 17:08 coveralls