groupConcat

fun <T : String?> Expression<T>.groupConcat(separator: String? = null, distinct: Boolean = false, orderBy: Pair<Expression<*>, SortOrder>): GroupConcat<T>

Concatenates all non-null input values of each group from this string expression, separated by separator.

When distinct is set to true, duplicate values will be eliminated. orderBy can be used to sort values in the concatenated string.

Samples

org.jetbrains.exposed.sql.tests.shared.dml.GroupByTests.testGroupConcat
fun <T : String?> Expression<T>.groupConcat(separator: String? = null, distinct: Boolean = false, orderBy: Array<Pair<Expression<*>, SortOrder>> = emptyArray()): GroupConcat<T>

Concatenates all non-null input values of each group from this string expression, separated by separator.

When distinct is set to true, duplicate values will be eliminated. orderBy can be used to sort values in the concatenated string by one or more expressions.

Samples

org.jetbrains.exposed.sql.tests.shared.dml.GroupByTests.testGroupConcat