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

[ISSUE-776] add selectFrom spec #777

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

kihwankim
Copy link
Contributor

@kihwankim kihwankim commented Oct 4, 2024

Motivation

  • queryDSL's selectFrom function

Modifications

  • add selectFrom spec in kotlinJdsl

Result

  • Users no longer need to call the select() and from() functions respectively when they query one entity information
       authorRepository.findAll {
            selectFrom(
                entity(Author::class),
                leftJoin(BookAuthor::class).on(path(Author::authorId).equal(path(BookAuthor::authorId))),
            ).where(
                path(BookAuthor::authorId).isNull(),
            ).orderBy(
                path(Author::authorId).asc(),
            )
        }

Closes

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.73%. Comparing base (565e71b) to head (19d48aa).
Report is 25 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #777   +/-   ##
========================================
  Coverage    91.73%   91.73%           
========================================
  Files          337      337           
  Lines         3447     3449    +2     
  Branches       209      209           
========================================
+ Hits          3162     3164    +2     
  Misses         223      223           
  Partials        62       62           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cj848
Copy link
Collaborator

cj848 commented Oct 5, 2024

Thank you for your contribution. The feature you added is a basic feature of JPQL and seems very useful.

However, since it is a new feature added to JDSL, it would be better to add it under the manual, docs. Please also work on the manual.

--- korean
기여해주셔서 고맙습니다. 추가해주신 기능은 JPQL에서 기본적으로 되던 기능으로 매우 유용해 보입니다.

다만 JDSL 에서 새로운 기능이 추가된 것이므로 메뉴얼인 docs 아래에 추가 되는게 좋을 것 같습니다. 메뉴얼 작업도 함께 부탁드리겠습니다.

@kihwankim
Copy link
Contributor Author

@cj848
Thank you for the review.
I added it to the manual.

--- korean
리뷰 감사합니다
메뉴얼에 추가했습니다.

selectFrom(path(Author::class))

// It cannot infer the result type.
selectFrom(path(Author::class))
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is different from the above example? It's the same code, but the explanation seems to be the opposite. I won't add a separate comment to the Korean explanation. It seems like the same problem.

--- korean
위 예제와 다른게 무엇일까요? 동일 코드인데 설명은 반대같이 보입니다.
한국어 설명쪽엔 별도 댓글 달지 않겠습니다. 동일한 문제 같아보입니다.

Copy link
Contributor Author

@kihwankim kihwankim Oct 7, 2024

Choose a reason for hiding this comment

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

ohh that's meaningless content. I fixted
thank you for checking it thoroughly!

--- korean
의미 없는 내용이 있었네요. 수정했습니다
꼼꼼하게 확인해 주셔서 감사합니다 (_ _)

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