Skip to content
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

GORM adapter #26

Merged
merged 1 commit into from
Nov 22, 2022
Merged

GORM adapter #26

merged 1 commit into from
Nov 22, 2022

Conversation

maranqz
Copy link
Member

@maranqz maranqz commented Nov 6, 2022

No description provided.

@maranqz maranqz linked an issue Nov 6, 2022 that may be closed by this pull request
@github-actions
Copy link

Coverage after merging gorm-adapter into main

88.47%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
gorm
   context.go66.67%100%100%66.67%40–43, 45, 53
   transaction.go46.88%100%100%46.88%115–117, 119–121, 32–33, 47–49, 60–64, 70–73, 78–79, 86–91, 93–97, 99
   factory.go100%100%100%100%
mongo
   settings.go94.34%100%100%94.34%43–44, 54
   factory.go100%100%100%100%
   transaction.go93.88%100%100%93.88%54–56
sql
   settings.go91.67%100%100%91.67%33–34, 44
   transaction.go100%100%100%100%
   context.go66.67%100%100%66.67%36–39, 41, 49
   savepoint.go100%100%100%100%
   factory.go100%100%100%100%
sqlx
   context.go66.67%100%100%66.67%37–40, 42, 50
   factory.go100%100%100%100%
   transaction.go100%100%100%100%
trm/context
   key.go100%100%100%100%
   context.go17.65%100%100%17.65%27–29, 31–33, 35–38, 40, 43–45
trm/manager
   manager.go91.58%100%100%91.58%122–123, 143, 29–30, 41–42, 52
   chain.go98.39%100%100%98.39%47
   closer.go96.67%100%100%96.67%57–58
   log.go100%100%100%100%
   option.go66.67%100%100%66.67%24–29
trm/settings
   option.go100%100%100%100%
   settings.go96.59%100%100%96.59%37–38, 48

@github-actions
Copy link

Coverage after merging gorm-adapter into main

89.68%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
gorm
   settings.go72.22%100%100%72.22%13–18, 32–34, 44
   context.go66.67%100%100%66.67%40–43, 45, 53
   transaction.go72.73%100%100%72.73%100–108, 110, 53–54, 60–61, 73–75, 99
   factory.go100%100%100%100%
mongo
   settings.go94.34%100%100%94.34%43–44, 54
   transaction.go93.88%100%100%93.88%54–56
   factory.go100%100%100%100%
sql
   context.go66.67%100%100%66.67%36–39, 41, 49
   factory.go100%100%100%100%
   settings.go91.67%100%100%91.67%33–34, 44
   savepoint.go100%100%100%100%
   transaction.go100%100%100%100%
sqlx
   factory.go100%100%100%100%
   context.go66.67%100%100%66.67%37–40, 42, 50
   transaction.go100%100%100%100%
trm/context
   context.go17.65%100%100%17.65%27–29, 31–33, 35–38, 40, 43–45
   key.go100%100%100%100%
trm/manager
   chain.go98.39%100%100%98.39%47
   closer.go96.67%100%100%96.67%57–58
   log.go100%100%100%100%
   manager.go91.58%100%100%91.58%122–123, 143, 29–30, 41–42, 52
   option.go66.67%100%100%66.67%24–29
trm/settings
   option.go100%100%100%100%
   settings.go96.59%100%100%96.59%37–38, 48

@github-actions
Copy link

Coverage after merging gorm-adapter into main

92.47%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
gorm
   context.go66.67%100%100%66.67%40–43, 45, 53
   factory.go100%100%100%100%
   transaction.go98.51%100%100%98.51%111
   settings.go91.67%100%100%91.67%33–34, 44
mongo
   factory.go100%100%100%100%
   transaction.go93.88%100%100%93.88%54–56
   settings.go94.34%100%100%94.34%43–44, 54
sql
   savepoint.go100%100%100%100%
   factory.go100%100%100%100%
   transaction.go100%100%100%100%
   context.go66.67%100%100%66.67%36–39, 41, 49
   settings.go91.67%100%100%91.67%33–34, 44
sqlx
   context.go66.67%100%100%66.67%37–40, 42, 50
   transaction.go100%100%100%100%
   factory.go100%100%100%100%
trm/context
   context.go17.65%100%100%17.65%27–29, 31–33, 35–38, 40, 43–45
   key.go100%100%100%100%
trm/manager
   log.go100%100%100%100%
   option.go66.67%100%100%66.67%24–29
   manager.go91.58%100%100%91.58%122–123, 143, 29–30, 41–42, 52
   chain.go98.39%100%100%98.39%47
   closer.go96.67%100%100%96.67%57–58
trm/settings
   settings.go96.59%100%100%96.59%37–38, 48
   option.go100%100%100%100%

@maranqz maranqz changed the title [WIP] GORM adapter GORM adapter Nov 13, 2022
@maranqz
Copy link
Member Author

maranqz commented Nov 13, 2022

@Flaiers if you have time, you can check PR.

Copy link

@Flaiers Flaiers left a comment

Choose a reason for hiding this comment

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

why this files change in current pull request?

  • mongo/example_test.go
  • mongo/transaction_test.go
  • sql/example_test.go
  • sql/transaction_test.go
  • sqlx/example_test.go
  • sqlx/transaction_test.go

@@ -195,12 +195,12 @@ func TestTransaction(t *testing.T) {
})

if trNested != nil {
require.Equal(t, true, trNested.IsActive())
require.True(t, trNested.IsActive())
Copy link
Member Author

Choose a reason for hiding this comment

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

I simplified the code. I didn't moved it to another PR because it is small changes.
@Flaiers
#26 (review)

@maranqz maranqz changed the base branch from main to v1.1.0 November 22, 2022 15:45
@maranqz maranqz merged commit 60afba8 into v1.1.0 Nov 22, 2022
@maranqz maranqz deleted the gorm-adapter branch November 22, 2022 15:51
maranqz added a commit that referenced this pull request Nov 25, 2022
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.

Transaction Manager over GORM
2 participants