test #173
|
@ -185,11 +185,13 @@ class ExplorerQueryRepository(
|
|||
val rotatedChars = characters.drop(offset) + characters.take(offset)
|
||||
|
||||
val caseBuilder = Expressions.stringTemplate(
|
||||
"CASE {0}",
|
||||
rotatedChars
|
||||
.withIndex()
|
||||
.joinToString(" ") {
|
||||
"WHEN {0} THEN {1}".format(member.email.startsWith(it.value), it.index + 1)
|
||||
"CASE",
|
||||
rotatedChars.withIndex().joinToString(" ") {
|
||||
"WHEN {0} LIKE {1} THEN {2}".format(
|
||||
member.email,
|
||||
"'" + it.value + "%'",
|
||||
it.index + 1
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue