@@ -267,16 +267,24 @@ class GroupingCriteriaCollector {
267267 invoke(org.mybatis.dynamic .sql.util.kotlin.elements.isNotInWhenPresent(values))
268268
269269 infix fun <T : Any > BindableColumn<T>.isBetween (value1 : T ) =
270- InfixBetweenBuilder (value1) { invoke(it) }
270+ SecondValueCollector <T > {
271+ invoke(org.mybatis.dynamic .sql.util.kotlin.elements.isBetween(value1).and (it))
272+ }
271273
272274 infix fun <T : Any > BindableColumn<T>.isBetweenWhenPresent (value1 : T ? ) =
273- InfixBetweenWhenPresentBuilder (value1) { invoke(it) }
275+ NullableSecondValueCollector <T > {
276+ invoke(org.mybatis.dynamic .sql.util.kotlin.elements.isBetweenWhenPresent(value1).and (it))
277+ }
274278
275279 infix fun <T : Any > BindableColumn<T>.isNotBetween (value1 : T ) =
276- InfixNotBetweenBuilder (value1) { invoke(it) }
280+ SecondValueCollector <T > {
281+ invoke(org.mybatis.dynamic .sql.util.kotlin.elements.isNotBetween(value1).and (it))
282+ }
277283
278284 infix fun <T : Any > BindableColumn<T>.isNotBetweenWhenPresent (value1 : T ? ) =
279- InfixNotBetweenWhenPresentBuilder (value1) { invoke(it) }
285+ NullableSecondValueCollector <T > {
286+ invoke(org.mybatis.dynamic .sql.util.kotlin.elements.isNotBetweenWhenPresent(value1).and (it))
287+ }
280288
281289 // for string columns, but generic for columns with type handlers
282290 infix fun <T : Any > BindableColumn<T>.isLike (value : T ) =
@@ -332,3 +340,11 @@ class GroupingCriteriaCollector {
332340 infix fun BindableColumn<String>.isNotInCaseInsensitiveWhenPresent (values : Collection <String ?>? ) =
333341 invoke(org.mybatis.dynamic .sql.util.kotlin.elements.isNotInCaseInsensitiveWhenPresent(values))
334342}
343+
344+ class SecondValueCollector <T > (private val consumer : (T ) -> Unit ) {
345+ infix fun and (value2 : T ) = consumer.invoke(value2)
346+ }
347+
348+ class NullableSecondValueCollector <T > (private val consumer : (T ? ) -> Unit ) {
349+ infix fun and (value2 : T ? ) = consumer.invoke(value2)
350+ }
0 commit comments