File tree 1 file changed +4
-14
lines changed
src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/elements
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -65,24 +65,14 @@ class KSimpleCaseDSL<T : Any> : KElseDSL {
65
65
}
66
66
internal val whenConditions = mutableListOf<SimpleCaseWhenCondition <T >>()
67
67
68
- fun `when` (firstCondition : VisitableCondition < T >, vararg subsequentConditions : VisitableCondition <T >) =
68
+ fun `when` (vararg conditions : VisitableCondition <T >) =
69
69
SimpleCaseThenGatherer { thenValue ->
70
- val allConditions = buildList {
71
- add(firstCondition)
72
- addAll(subsequentConditions)
73
- }
74
-
75
- whenConditions.add(ConditionBasedWhenCondition (allConditions, thenValue))
70
+ whenConditions.add(ConditionBasedWhenCondition (conditions.asList(), thenValue))
76
71
}
77
72
78
- fun `when` (firstValue : T , vararg subsequentValues : T ) =
73
+ fun `when` (vararg values : T ) =
79
74
SimpleCaseThenGatherer { thenValue ->
80
- val allConditions = buildList {
81
- add(firstValue)
82
- addAll(subsequentValues)
83
- }
84
-
85
- whenConditions.add(BasicWhenCondition (allConditions, thenValue))
75
+ whenConditions.add(BasicWhenCondition (values.asList(), thenValue))
86
76
}
87
77
88
78
override infix fun `else` (column : BasicColumn ) {
You can’t perform that action at this time.
0 commit comments