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

Add JoinableExpressionGenerator interface #537

Merged
merged 2 commits into from Feb 2, 2023
Merged

Conversation

seongahjo
Copy link
Contributor

Summary

Add JoinableExpressionGenerator for Exp

(Optional): Description

Removing class Exp, ExpList
Splitting ExpressionGenerators into ExpressionGeneratorExtensions and ExpressionGenerators for better readability

infix fun intoGetter(getter: KFunction1<T, Boolean>): Exp<Boolean> =
Exp(delegate.join(PropertyExpressionGenerator(KotlinGetterProperty(getter))))
interface JoinableExpressionGenerator<F, T> : ExpressionGenerator {
infix fun <R> into(property: KProperty1<T, R?>): JoinableExpressionGenerator<F, R>
Copy link
Contributor

@acktsap acktsap Jan 5, 2023

Choose a reason for hiding this comment

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

이 pr하고 별개의 이야기긴 한데 이런 부분에서 <R><R : Any>로 바꾸는건 어떠신가요? <R>이 사실 <R : Any?>인데 인자로 들어오는 property: KProperty<T, R?>에도 물음표가 붙어있어서 중복인 느낌이긴 해서요.

@seongahjo seongahjo modified the milestones: 0.4.11, 0.5.0 Jan 9, 2023
@seongahjo seongahjo merged commit 2398d2a into main Feb 2, 2023
@seongahjo seongahjo deleted the sa/refactor-exp branch February 2, 2023 09:55
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.

None yet

3 participants