-
Notifications
You must be signed in to change notification settings - Fork 28
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
refactor(database): move service logic into separate package #816
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to refactor/database/service
Codecov Report
@@ Coverage Diff @@
## main #816 +/- ##
==========================================
- Coverage 57.70% 57.49% -0.22%
==========================================
Files 263 271 +8
Lines 15922 15892 -30
==========================================
- Hits 9188 9137 -51
- Misses 6319 6331 +12
- Partials 415 424 +9
|
cognifloyd
approved these changes
Apr 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎇
@jbrockopp We plan to review this within the next couple weeks. |
wass3rw3rk
approved these changes
May 10, 2023
per githubstatus.com, github is having some issues currently. try rerunning workflows later. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based off of #574, #663, #687, #692, #721, #722, #782 and #810
This change continues the refactor efforts initially introduced in the above PRs.
This adds a new
service
package to thegithub.com/go-vela/server/database
package.This contains a
ServiceInterface
interface declaring all functions necessary for service based interactions with the database:server/database/service/interface.go
Lines 11 to 49 in d930b22
This package also contains the
engine
which implements the above service interface:server/database/service/service.go
Lines 23 to 38 in d930b22
This
engine
contains no raw SQL queries for integrating with theservices
table.Instead, we leverage our DB library's (https://gorm.io/) agnostic abstraction for integrating with that table.