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

[스티치] 체스 스프링 실습 3단계 미션 제출입니다 #122

Merged
merged 2 commits into from May 3, 2020
Merged

Conversation

lxxjn0
Copy link

@lxxjn0 lxxjn0 commented Apr 29, 2020

이번 Spring Data JDBC 적용 미션을 구현하는데 4단계와 맞물려서 최대한 커밋을 분리해보려고 노력했습니다.
그래도 제대로 분리가 안되서 코드 흐름 상 어색한 부분들이 있을 수 있는데 그런 부분들에 대해서 궁금한 점 언제든지 질문주셔도 괜찮습니다 :)

코드 리뷰 잘 부탁드리겠습니다 👍

- Spring Data JDBC 적용을 위한 GameRoomRepository 구현
- schema.sql 구현
Copy link

@Ramen6315 Ramen6315 left a comment

Choose a reason for hiding this comment

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

안녕하세요 스티치!

구현을 굉장히 잘해주셔서 크게 의견 드릴부분이 없었습니다!

GameRoomRepository에 findByName의 return 에 대해서 짧은 의견 남겨드렸는데요!

알고 계신 부분이라고 생각했지만 그래도 짧은 의견이라도 드리는게 좋다고 생각이 들어서 짧은 코멘트 남겼습니다.

궁금하신점 있으시면 24시간 언제든 DM 남겨주세요!

감사합니다!

List<GameRoom> findAll();

@Query("SELECT * FROM game_room WHERE name = :name")
GameRoom findByName(@Param("name") final String name);

Choose a reason for hiding this comment

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

@query annotation을 이용해서 직접 만들어 주셨는데요!

처음에는 혹시나 name이 존재 하지 않을 경우가 있지 않나?
했는데 직접 실행해보니까 현재 만들어진 방의 목록을 선택하는 방식으로 구현을 해주신걸 확인하고 존재 하지 않을 경우가 없다고 생각하셔서 Optional로 처리를 안해 주셨다고 생각했습니다!.

이부분은 큰 문제가 없다고 생각이 든 부분 이지만 상황에 따라서 Optional로 감싸야 할 경우가 있다고 생각해서 알고 계실수도 있지만 Optional로 감싸야 할 경우에 대해서 한번 생각 해보시면 좋을거 같아서 코멘트 남겼습니다.!

@woowahanCU woowahanCU merged commit 9275ae7 into woowacourse:lxxjn0 May 3, 2020
@lxxjn0 lxxjn0 deleted the step3 branch May 17, 2020 08:51
@lxxjn0 lxxjn0 restored the step3 branch June 27, 2020 19:35
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.

None yet

3 participants