I have a query that is hitting a table that has an array column. When I am processing my records I would like to take the array column's data and treat it like a string array and grab the first value. I had assumed I could do the following:
while (resultSet.next()) {
val clients = resultSet.getArray("clients")
println(clients[0])
}
But when I do this I get the error:
Error:(34, 3) Kotlin: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: @InlineOnly public operator inline fun <@OnlyInputTypes K, V> Map.get(key: Int): ??? defined in kotlin.collections @SinceKotlin public operator fun MatchGroupCollection.get(name: String): MatchGroup? defined in kotlin.text
getArray
returns type Array!
so I had assumed I could access values by index. What do I have to do to access this array of values?