-
Notifications
You must be signed in to change notification settings - Fork 30
feat(database): add agnostic engine #868
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
Merged
Merged
Conversation
This file contains hidden or 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
Codecov Report
@@ Coverage Diff @@
## main #868 +/- ##
==========================================
+ Coverage 71.92% 72.04% +0.12%
==========================================
Files 307 310 +3
Lines 12872 12930 +58
==========================================
+ Hits 9258 9316 +58
Misses 3168 3168
Partials 446 446
|
cognifloyd
approved these changes
Jun 1, 2023
plyr4
approved these changes
Jun 2, 2023
This was referenced Jun 7, 2023
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, #810, #816 and #858
This change continues the refactor efforts initially introduced in the above PRs.
Those PRs ensured we leverage our DB library's (GORM) agnostic abstraction for integrating with a database.
Now, we can begin the efforts to create an agnostic
enginethat will be shared across all drivers:server/database/database.go
Lines 49 to 66 in ab04f2f
We also add a
Config{}that currently mirrors theSetup{}(I think "config" is a better name compared to "setup"):server/database/database.go
Lines 29 to 47 in ab04f2f
This will help ensure we reduce the amount of duplicate code across the currently supported drivers:
Also, this will lower the barrier to entry for adding support for future drivers assuming they are supported by GORM.
Basically, we're ensuring we leverage the full functionality our DB library (GORM) has to offer.