Chore: replace xorm by sqlx in dashboardversion service (#53869)

This commit is contained in:
ying-jeanne
2022-08-25 16:04:16 -05:00
committed by GitHub
parent 8deababa50
commit fd01161bcc
9 changed files with 278 additions and 142 deletions

View File

@@ -48,6 +48,8 @@ func (gs *SessionDB) Beginx() (*SessionTx, error) {
}
func (gs *SessionDB) WithTransaction(ctx context.Context, callback func(*SessionTx) error) error {
// Instead of begin a transaction, we need to check the transaction in context, if it exists,
// we can reuse it.
tx, err := gs.Beginx()
if err != nil {
return err