-
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.fone.common.config.jpa | ||
|
||
import com.linecorp.kotlinjdsl.query.spec.expression.ExpressionSpec | ||
import com.linecorp.kotlinjdsl.query.spec.expression.LiteralSpec | ||
import com.linecorp.kotlinjdsl.query.spec.predicate.EqualValueSpec | ||
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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 아 아뇨, 원래 인터페이스 갖고 뭐하려다가 지웠는데 깜빡한 모양입니다. |
||
|
||
fun <R> ExpressionSpec<R>.inValues(values: Collection<R>): PredicateSpec { | ||
if (values.isEmpty()) { | ||
// values가 없으면 항상 false이도록 | ||
return EqualValueSpec(LiteralSpec(1), 0) | ||
} | ||
return InValueSpec(this, values) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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.
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.
네 좋습니다