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

[JDBC 라이브러리 구현하기 - 1단계] 호이(이건호) 미션 제출합니다. #347

Merged
merged 5 commits into from
Oct 2, 2023

Conversation

This2sho
Copy link

nice to meet u 매튜

1단계를 하다 보니 코드를 수정한 커밋이 하나밖에 없네요..!
이번 JDBC 미션 잘 부탁드립니다!

Copy link

@kpeel5839 kpeel5839 left a comment

Choose a reason for hiding this comment

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

건호씨 아주 기가막힌 코드네요!

길지는 않지만 많이 배웠습니다.

많이 따라해야겠어요 ~~ ㅎㅎ

죄송하지만 현재 저의 리뷰가 너무 늦어버린 관계로, 남은 일정 고려하여 머지하도록 하겠습니다!

제가 남긴 피드백은 건호씨의 선택하에 반영해주시도록 해주시죠!

고생하셨습니다~! 다음 단계 Let's go gun ho!

@@ -0,0 +1,4 @@
# 구현 기능 목록

- [ ] UserDao에 있는 코드 JdbcTemplate으로 이동

Choose a reason for hiding this comment

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

대단합니다!

구현 기능 목록 정리하는 거... 저도 해야하는데... 자꾸 안하게 되네요

자극 받습니다.

Copy link
Author

Choose a reason for hiding this comment

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

ㄴㅇㄱ 저도 해야하는데... 하다가 이번에 했네요.. !!

Choose a reason for hiding this comment

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

pusan national university ..

@FunctionalInterface
public interface RowMapper<T> {

T mapRow(ResultSet resultSet) throws SQLException;

Choose a reason for hiding this comment

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

키야아아 굳입니다 건호짱 👍

pstmt.executeUpdate();
} catch (SQLException e) {
log.error(e.getMessage(), e);
throw new RuntimeException(e);

Choose a reason for hiding this comment

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

조금 더 구체적인 Exception 을 사용할 수 있지 않을까요 ??

Copy link
Author

Choose a reason for hiding this comment

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

좋습니드아!!

Comment on lines +36 to +41
final PreparedStatement preparedStatement = conn.prepareStatement(sql);
int index = 1;
for (Object parameter : parameters) {
preparedStatement.setObject(index++, parameter);
}
return preparedStatement;

Choose a reason for hiding this comment

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

아예 세팅된 PreparedStatement 를 반환받도록 메서드 분리하는 것이 굉장히 좋네요!

Comment on lines +48 to +53
log.debug("query : {}", sql);

if (rs.next()) {
return rowMapper.mapRow(rs);
}
return null;

Choose a reason for hiding this comment

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

조회 결과가 2개 이상인 경우를 예외 상황이라고 본다면, 어떻게 처리 해줄 수 있을까요?

Copy link
Author

Choose a reason for hiding this comment

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

예외처리 하도록 하겠슴돠~!!

@kpeel5839 kpeel5839 merged commit 934915d into woowacourse:this2sho Oct 2, 2023
1 check failed
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.

3 participants