Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dokka = "2.2.0"
mavenPublish = "0.37.0"
coroutines = "1.11.0"
serialization = "1.11.0"
lettuce = "6.5.1.RELEASE"
lettuce = "7.6.0.RELEASE"
postgresql = "42.7.13"
hikari = "7.1.0"
testcontainers = "2.0.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,20 @@ public class RedisStore(
}
}

private enum class Ft : ProtocolKeyword {
CREATE,
SEARCH,
;
/**
* A RediSearch command keyword. Deliberately not an enum: Lettuce 7 added `name()` to
* [ProtocolKeyword], and a Kotlin enum's implicit `name` property compiles to the same JVM
* signature, so the two clash and the class no longer compiles.
*/
private class Ft private constructor(private val keyword: String) : ProtocolKeyword {
private val encoded = ("FT.$keyword").toByteArray(US_ASCII)

private val encoded = ("FT." + name).toByteArray(US_ASCII)
override fun getBytes(): ByteArray = encoded

companion object {
val CREATE = Ft("CREATE")
val SEARCH = Ft("SEARCH")
}
}

private companion object {
Expand Down