Philipp Mayer
09/18/2019, 7:40 PMoverride fun getColorByCompany(company: String): List<String> {
val color = transaction { Companies
.slice(Companies.color)
.select { Companies.name eq company }
.map { it.toString() }
}
return color
}
How can I get a single string as result and not a list of strings?
Or should I convert it afterwards for myself?
Thanks in advance!Evan R.
09/18/2019, 7:49 PM.firstOrNull()
here. That way you’ll get a string if it exists or null if no results were returned.Philipp Mayer
09/18/2019, 7:53 PM