File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin/elements Expand file tree Collapse file tree 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 {
6565 }
6666 internal val whenConditions = mutableListOf<SimpleCaseWhenCondition <T >>()
6767
68- fun `when` (firstCondition : VisitableCondition < T >, vararg subsequentConditions : VisitableCondition <T >) =
68+ fun `when` (vararg conditions : VisitableCondition <T >) =
6969 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))
7671 }
7772
78- fun `when` (firstValue : T , vararg subsequentValues : T ) =
73+ fun `when` (vararg values : T ) =
7974 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))
8676 }
8777
8878 override infix fun `else` (column : BasicColumn ) {
You can’t perform that action at this time.
0 commit comments