-
Notifications
You must be signed in to change notification settings - Fork 56
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
Remove GormDB from query functions that already used SQL #3097
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
dnephin
requested review from
BruceMacD,
jmorganca and
pdevine
as code owners
September 1, 2022 18:40
dnephin
changed the title
Remove GormTxn from query functions that already used SQL
Remove GormDB from query functions that already used SQL
Sep 1, 2022
BruceMacD
approved these changes
Sep 2, 2022
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.
Just some suggestions for consistency
dnephin
force-pushed
the
dnephin/data-access-key-queries-2
branch
from
September 2, 2022 19:19
06225fa
to
527b6a1
Compare
dnephin
force-pushed
the
dnephin/data-replace-gorm-txn-1
branch
from
September 2, 2022 19:22
4f4fec2
to
055e9f4
Compare
dnephin
force-pushed
the
dnephin/data-access-key-queries-2
branch
2 times, most recently
from
September 6, 2022 16:03
9136f44
to
fcf88ac
Compare
dnephin
force-pushed
the
dnephin/data-replace-gorm-txn-1
branch
from
September 6, 2022 16:04
055e9f4
to
63fb1c0
Compare
dnephin
force-pushed
the
dnephin/data-access-key-queries-2
branch
from
September 6, 2022 19:53
fcf88ac
to
a545a90
Compare
dnephin
force-pushed
the
dnephin/data-replace-gorm-txn-1
branch
from
September 6, 2022 22:26
63fb1c0
to
b882063
Compare
dnephin
force-pushed
the
dnephin/data-access-key-queries-2
branch
from
September 6, 2022 22:39
a545a90
to
333b84c
Compare
Use the stdlib interface or data interface.
In the future this should return the value of a field on data.DB. For now we can get the reference from gorm. The panic is added instead of an error because if we can't get the sqlDB this represents a programming error. We always call this on the data.DB, which should always have the right state. This commit removes another call to GormTxn.
dnephin
force-pushed
the
dnephin/data-replace-gorm-txn-1
branch
from
September 6, 2022 22:41
b882063
to
63c1085
Compare
Co-authored-by: Bruce MacDonald <brucewmacdonald@gmail.com>
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.
Summary
Branched from #3094
This PR removes
GormTxn
from a few functions that were already using regular SQL through the gorm interface.Related Issues
Related to #2415