You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fun <T:Any> isLike(value:T, escapeCharacter:Char? = null) =KIsLikeEscape.isLike(value, escapeCharacter)
155
+
156
+
@Test
157
+
funtestIsLikeEscape() {
158
+
sqlSessionFactory.openSession().use { session ->
159
+
val mapper = session.getMapper(CommonSelectMapper::class.java)
160
+
val selectStatement = select(id, description) {
161
+
from(items)
162
+
where {
163
+
description(isLike("Item 1%", '#'))
164
+
}
165
+
}
166
+
167
+
assertThat(selectStatement.selectStatement).isEqualTo("select id, description from items where description like #{parameters.p1,jdbcType=VARCHAR} ESCAPE '#'")
description(isLike("%fred%", '#').map { s -> s.uppercase(Locale.getDefault()) })
194
+
}
195
+
}
196
+
197
+
assertThat(selectStatement.selectStatement).isEqualTo("select id, description from items where description like #{parameters.p1,jdbcType=VARCHAR} ESCAPE '#'")
0 commit comments