org.jooq.kotlin.Extensions.kt Maven / Gradle / Ivy
package org.jooq.kotlin
import org.jooq.*
import org.jooq.impl.DSL.*
import java.util.stream.Collector
// ----------------------------------------------------------------------------
// Extensions to collect Field> into other types
// ----------------------------------------------------------------------------
fun Field>.collecting(collector: Collector): Field = convertFrom { it.collect(collector) }
inline fun Field>>.intoArray(): Field> = collecting(Records.intoArray(E::class.java))
inline fun Field>.intoArray(noinline mapper: (R) -> E): Field> = collecting(Records.intoArray(E::class.java, mapper))
fun > Field>.intoGroups(): Field