Skip to content

Commit 64b38dc

Browse files
committed
Definitely not null for insert mappings
1 parent 50d7cb6 commit 64b38dc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import org.mybatis.dynamic.sql.util.ValueOrNullMapping
2727
import org.mybatis.dynamic.sql.util.ValueWhenPresentMapping
2828

2929
@MyBatisDslMarker
30-
sealed class AbstractInsertColumnMapCompleter<T : Any>(
30+
sealed class AbstractInsertColumnMapCompleter<T>(
3131
internal val column: SqlColumn<T>,
3232
internal val mappingConsumer: (AbstractColumnMapping) -> Unit) {
3333

@@ -38,15 +38,15 @@ sealed class AbstractInsertColumnMapCompleter<T : Any>(
3838
infix fun toStringConstant(constant: String) = mappingConsumer.invoke(StringConstantMapping.of(column, constant))
3939
}
4040

41-
class MultiRowInsertColumnMapCompleter<T : Any>(
41+
class MultiRowInsertColumnMapCompleter<T>(
4242
column: SqlColumn<T>,
4343
mappingConsumer: (AbstractColumnMapping) -> Unit)
4444
: AbstractInsertColumnMapCompleter<T>(column, mappingConsumer) {
4545

4646
infix fun toProperty(property: String) = mappingConsumer.invoke(PropertyMapping.of(column, property))
4747
}
4848

49-
class SingleRowInsertColumnMapCompleter<T : Any>(
49+
class SingleRowInsertColumnMapCompleter<T>(
5050
column: SqlColumn<T>,
5151
mappingConsumer: (AbstractColumnMapping) -> Unit)
5252
: AbstractInsertColumnMapCompleter<T>(column, mappingConsumer) {
@@ -57,14 +57,14 @@ class SingleRowInsertColumnMapCompleter<T : Any>(
5757
mappingConsumer.invoke(PropertyWhenPresentMapping.of(column, property, valueSupplier))
5858
}
5959

60-
class GeneralInsertColumnSetCompleter<T : Any>(
60+
class GeneralInsertColumnSetCompleter<T>(
6161
column: SqlColumn<T>,
6262
mappingConsumer: (AbstractColumnMapping) -> Unit)
6363
: AbstractInsertColumnMapCompleter<T>(column, mappingConsumer) {
6464

65-
infix fun toValue(value: T) = toValue { value }
65+
infix fun toValue(value: T & Any) = toValue { value }
6666

67-
infix fun toValue(value: () -> T) = mappingConsumer.invoke(ValueMapping.of(column, value))
67+
infix fun toValue(value: () -> T & Any) = mappingConsumer.invoke(ValueMapping.of(column, value))
6868

6969
infix fun toValueOrNull(value: T?) = toValueOrNull { value }
7070

0 commit comments

Comments
 (0)