Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve Kotlin CASE DSL#785

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

jeffgbutler
Copy link
Member

This PR changes the "else" and "then" functions to infix. In addition, we simplify "then" functions in the simple CASE expression.

Previously...

select(case(id) {    `when`(1,2,3) { then(true) }    `else`(false)  } `as`"small_id") {    from(foo)}

Now...

select(case(id) {    `when`(1,2,3) thentrue    `else`(false)  } `as`"small_id") {    from(foo)}

Infix not as useful in this case because using it requires an explicit "this", but some might prefer that syntax.
@jeffgbutlerjeffgbutler added this to the1.5.2 milestoneMay 1, 2024
@coveralls
Copy link

coveralls commentedMay 1, 2024
edited
Loading

Coverage Status

coverage: 100.0%. remained the same
when pulling15d258e on jeffgbutler:improve-kotlin-case-dsl
intoecf4bc3 on mybatis:master.

@jeffgbutlerjeffgbutler merged commite8f1890 intomybatis:masterMay 1, 2024
@jeffgbutlerjeffgbutler deleted the improve-kotlin-case-dsl branchMay 1, 2024 14:24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
1.5.2
Development

Successfully merging this pull request may close these issues.

2 participants
@jeffgbutler@coveralls

[8]ページ先頭

©2009-2025 Movatter.jp