Skip to content

Conversation

@ecrupper
Copy link
Contributor

Refactor effort reflected in the following PRs:
#861

This refactor is an effort to eliminate several Get requests to the DB immediately after creating or updating a resource. Fortunately, with Gorm's create and save methods, the object is populated with any fields that are generated upon DB insertion (ID namely). In other words, we can safely return the object we use for these operations.

@ecrupper ecrupper self-assigned this May 26, 2023
@ecrupper ecrupper requested a review from a team as a code owner May 26, 2023 19:49
@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #865 (f710fae) into main (63d323f) will decrease coverage by 0.01%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #865      +/-   ##
==========================================
- Coverage   72.07%   72.07%   -0.01%     
==========================================
  Files         312      312              
  Lines       13051    13049       -2     
==========================================
- Hits         9407     9405       -2     
  Misses       3188     3188              
  Partials      456      456              
Impacted Files Coverage Δ
database/log/create.go 65.38% <57.14%> (-1.29%) ⬇️
database/log/update.go 65.38% <57.14%> (-1.29%) ⬇️

cognifloyd
cognifloyd previously approved these changes May 26, 2023
Copy link
Member

@wass3rw3rk wass3rw3rk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

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.

5 participants