|
1 | 1 | /* |
2 | | - * Copyright 2016-2021 the original author or authors. |
| 2 | + * Copyright 2016-2022 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -42,45 +42,44 @@ class KotlinGeneralInsertBuilder(private val dsl: GeneralInsertDSL) : Buildable< |
42 | 42 |
|
43 | 43 | @MyBatisDslMarker |
44 | 44 | inner class GeneralInsertSetClauseFinisher<T>(private val column: SqlColumn<T>) { |
45 | | - fun toNull(): KotlinGeneralInsertBuilder = |
| 45 | + fun toNull(): Unit = |
46 | 46 | applyToDsl { |
47 | 47 | set(column).toNull() |
48 | 48 | } |
49 | 49 |
|
50 | | - fun toConstant(constant: String): KotlinGeneralInsertBuilder = |
| 50 | + fun toConstant(constant: String): Unit = |
51 | 51 | applyToDsl { |
52 | 52 | set(column).toConstant(constant) |
53 | 53 | } |
54 | 54 |
|
55 | | - fun toStringConstant(constant: String): KotlinGeneralInsertBuilder = |
| 55 | + fun toStringConstant(constant: String): Unit = |
56 | 56 | applyToDsl { |
57 | 57 | set(column).toStringConstant(constant) |
58 | 58 | } |
59 | 59 |
|
60 | | - fun toValue(value: T): KotlinGeneralInsertBuilder = toValue { value } |
| 60 | + fun toValue(value: T): Unit = toValue { value } |
61 | 61 |
|
62 | | - fun toValue(value: () -> T): KotlinGeneralInsertBuilder = |
| 62 | + fun toValue(value: () -> T): Unit = |
63 | 63 | applyToDsl { |
64 | 64 | set(column).toValue(value) |
65 | 65 | } |
66 | 66 |
|
67 | | - fun toValueOrNull(value: T?): KotlinGeneralInsertBuilder = toValueOrNull { value } |
| 67 | + fun toValueOrNull(value: T?): Unit = toValueOrNull { value } |
68 | 68 |
|
69 | | - fun toValueOrNull(value: () -> T?): KotlinGeneralInsertBuilder = |
| 69 | + fun toValueOrNull(value: () -> T?): Unit = |
70 | 70 | applyToDsl { |
71 | 71 | set(column).toValueOrNull(value) |
72 | 72 | } |
73 | 73 |
|
74 | | - fun toValueWhenPresent(value: T?): KotlinGeneralInsertBuilder = toValueWhenPresent { value } |
| 74 | + fun toValueWhenPresent(value: T?): Unit = toValueWhenPresent { value } |
75 | 75 |
|
76 | | - fun toValueWhenPresent(value: () -> T?): KotlinGeneralInsertBuilder = |
| 76 | + fun toValueWhenPresent(value: () -> T?): Unit = |
77 | 77 | applyToDsl { |
78 | 78 | set(column).toValueWhenPresent(value) |
79 | 79 | } |
80 | 80 |
|
81 | | - private fun applyToDsl(block: GeneralInsertDSL.() -> Unit): KotlinGeneralInsertBuilder = |
82 | | - this@KotlinGeneralInsertBuilder.apply { |
83 | | - dsl.apply(block) |
84 | | - } |
| 81 | + private fun applyToDsl(block: GeneralInsertDSL.() -> Unit): Unit { |
| 82 | + this@KotlinGeneralInsertBuilder.dsl.apply(block) |
| 83 | + } |
85 | 84 | } |
86 | 85 | } |
0 commit comments