File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import org.mybatis.dynamic.sql.SqlTable
21
21
import org.mybatis.dynamic.sql.insert.BatchInsertDSL
22
22
import org.mybatis.dynamic.sql.insert.GeneralInsertDSL
23
23
import org.mybatis.dynamic.sql.insert.InsertDSL
24
- import org.mybatis.dynamic.sql.insert.InsertSelectModel
25
24
import org.mybatis.dynamic.sql.insert.MultiRowInsertDSL
26
25
27
26
/* *
@@ -48,14 +47,13 @@ object KotlinModelBuilderFunctions {
48
47
fun insertInto (table : SqlTable , completer : GeneralInsertCompleter ) =
49
48
GeneralInsertDSL .insertInto(table).apply (completer).build()
50
49
51
- fun insertSelect (table : SqlTable , completer : InsertSelectCompleter ): InsertSelectModel {
50
+ fun insertSelect (table : SqlTable , completer : InsertSelectCompleter ) =
52
51
with (KotlinInsertSelectSubQueryBuilder ().apply (completer)) {
53
- return SqlBuilder .insertInto(table)
52
+ SqlBuilder .insertInto(table)
54
53
.withColumnList(columnList)
55
54
.withSelectStatement(this )
56
55
.build()
57
56
}
58
- }
59
57
60
58
fun <T > BatchInsertDSL.IntoGatherer<T>.into (table : SqlTable , completer : BatchInsertCompleter <T >) =
61
59
into(table).also (completer).build()
Original file line number Diff line number Diff line change @@ -82,8 +82,8 @@ class KotlinUpdateBuilder(private val dsl: UpdateDSL<UpdateModel>) :
82
82
}
83
83
84
84
private fun applyToDsl (block : UpdateDSL <UpdateModel >.() -> Unit ) =
85
- this @KotlinUpdateBuilder.also {
86
- it. dsl.apply (block)
85
+ this @KotlinUpdateBuilder.apply {
86
+ dsl.apply (block)
87
87
}
88
88
}
89
89
}
You can’t perform that action at this time.
0 commit comments