Skip to content

Commit f28edaa

Browse files
committed
Kotlin Polishing
1 parent 39a59df commit f28edaa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/KotlinSelectBuilder.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ class KQueryExpressionDSL: QueryExpressionDSL<SelectModel> {
104104
}
105105

106106
companion object {
107-
fun buildSubQuery(subQuery: KotlinQualifiedSubQueryBuilder): SubQuery {
108-
return SubQuery.Builder().withSelectModel(subQuery.build())
109-
.withAlias(subQuery.correlationName)
110-
.build()
111-
}
107+
fun buildSubQuery(subQuery: KotlinQualifiedSubQueryBuilder): SubQuery =
108+
with(SubQuery.Builder()) {
109+
withSelectModel(subQuery.build())
110+
withAlias(subQuery.correlationName)
111+
build()
112+
}
112113
}
113114
}

0 commit comments

Comments
 (0)