-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FO-1037] sql in 문에 값이 없는 경우 true으로 변환되는 문제 픽스 #434
Conversation
…ues는 빈 List가 주어진 경우 false으로 되도록 구현
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 요즘 바빠서 신경을 못쓰고있네요.
이거 jdsl 버그 인거죠?
querydsl 안쓴지 좀 돼서 기억이 잘 안나는데, querydsl에서는 비슷한 이슈 없었던 것 같아서요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DslConfig 대신 jdslExt 같은 네이밍은 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 좋습니다
import com.linecorp.kotlinjdsl.query.spec.predicate.InValueSpec | ||
import com.linecorp.kotlinjdsl.query.spec.predicate.PredicateSpec | ||
|
||
class DslConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 lint때문에 추가한거죠?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 아뇨, 원래 인터페이스 갖고 뭐하려다가 지웠는데 깜빡한 모양입니다.
// values가 없으면 항상 false이도록 | ||
return EqualValueSpec(LiteralSpec(1), 0) | ||
} | ||
return InValueSpec(this, values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 함수는 어떻게 찾으셨나여?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kotlin-jdsl 라이브러리 코드 보고 적당히 원하는 부분 합쳤습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
기존 dsl의 in문의 value 값이 [] 인 경우 해당 true로 치환되어 의도와 다르게 결과가 나오는 경우가 발생.
예시:
get /api/v1/profiles?type=ACTOR&domains=PAINTING
해당 경우 PAINTING 도메인을 가진 프로필이 존재하지 않은 경우 응답 값으로 []이 아웃풋인게 기대값이나
get /api/v1/profiles?type=ACTOR
와 같은 값을 돌려줌.