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

[#45] find email #64

Closed
wants to merge 2 commits into from
Closed

[#45] find email #64

wants to merge 2 commits into from

Conversation

memoer
Copy link
Contributor

@memoer memoer commented Aug 3, 2022

Related Issues

[인증] 유저 아이디 찾기 #45

Description

  • 아이디를 찾을 경우 "이름, 생년월일"을 사용하기 때문에, 회원가입시 필수가 아니였던 "생년월일" 데이터를 필수로 변경하였습니다.

@memoer memoer changed the title [#45] jn find email [#45] find email Aug 3, 2022
@memoer memoer added this to In progress in AirJnC Project via automation Aug 3, 2022
@memoer memoer added this to the [UseCases] 사용자 - 인증 milestone Aug 3, 2022
- 테스트 코드 아직 작성하지 않았습니다.
- "이름, 생년월일" 을 통해 유저 아이디 찾기를 진행합니다.
- "생년월일"이 아이디 찾기에서 사용되기 때문에, 회원가입시 "생년월일" 데이터를 필수적으로 넘겨야 하는 식으로 변경하였습니다.
SELECT *
FROM user
WHERE email = #{email};
</select>
Copy link
Contributor

Choose a reason for hiding this comment

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

select를 할 때 *보다는 컬럼명을 명시해주는 것이 좋을 것 같습니다.

  1. DB의 메타정보가 변경(컬럼이 추가) 되었을 때, Domain/Entity에 해당 정보가 추가되어있지 않으면 오류가 발생할 수 있습니다.
    • Lombok의 @AllArgsConstructor 사용을 지양하는 것과 비슷한 느낌
  2. findByEmail같은 경우는 사실상 email만 필요합니다.
    • email같은 경우는 인덱스를 걸어둘 확률이 높은 컬럼으로 보입니다
    • email만 가져온다면 데이터파일을 거치지 않고 인덱스에서 조회가 끝나기 때문에 쿼리조회 성능 또한 오를 것으로 생각됩니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이거는 창훈님꼐서 말씀하신 게 더 최적화가 될 것 같네요!
변경해보도록 하겠습니다.

@memoer memoer added the Type: Feature 기능 개발 label Aug 4, 2022
@memoer memoer closed this Aug 10, 2022
AirJnC Project automation moved this from In progress to Done Aug 10, 2022
@memoer memoer deleted the feat/#45_jn-find-email branch September 15, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature 기능 개발
Projects
Development

Successfully merging this pull request may close these issues.

[인증] 유저 아이디 찾기
2 participants