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

Update to use db.Transaction() #16

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Conversation

mokhs00
Copy link
Member

@mokhs00 mokhs00 commented Nov 13, 2024

Summary

  • transaction 사용하도록 반영하는 작업입니다
    • repository 인터페이스들에서 context, db를 주입받도록 수정
    • service struct에서 db를 필드로 들고있도록 수정
  • 하는 김에 db ping 로직도 추가

@mokhs00 mokhs00 self-assigned this Nov 13, 2024
@mokhs00 mokhs00 requested a review from falconlee236 November 13, 2024 10:22
@mokhs00 mokhs00 linked an issue Nov 13, 2024 that may be closed by this pull request
@falconlee236
Copy link
Member

@mokhs00 이 내용은 내일 씹고뜯고 맛보겠습니당

Copy link
Member

@falconlee236 falconlee236 left a comment

Choose a reason for hiding this comment

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

자세히 보니까 PR말처럼 사전 작업이네요 함수 명세에 context를 추가만 해두고 아직 트랜젝션 관련 처리는 안한것 같습니다

그래도 서비스 layer로 db 트랜젝션을 올리니 레포지토리에서
result := r.db.과 같은 코드가 result := db.와 같이 변한점은 매우 마음에 드네요

@mokhs00 mokhs00 merged commit b17c769 into main Nov 14, 2024
@mokhs00 mokhs00 deleted the feat/update-to-use-transactional branch November 14, 2024 02:27
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.

Implement Transaction util
2 participants