You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have question about transaction with context while use GORM with postgresql.
I didn't found documentation about case if will be created transaction with context and after it will be closed context before make request. In this case will be request executed without errors, or there will happen error and will be need to call rollback in manual way or there will happen auto rollback?
For example in pgx which use gorm in documentation exists information that the context only affects the begin command. i.e. there is no auto-rollback on context cancellation, but how its works in gorm unfortunatelly I didnt found.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have question about transaction with context while use GORM with postgresql.
I didn't found documentation about case if will be created transaction with context and after it will be closed context before make request. In this case will be request executed without errors, or there will happen error and will be need to call rollback in manual way or there will happen auto rollback?
For example in pgx which use gorm in documentation exists information that the context only affects the begin command. i.e. there is no auto-rollback on context cancellation, but how its works in gorm unfortunatelly I didnt found.
Example:
Beta Was this translation helpful? Give feedback.
All reactions