org.jooq.kotlin.Extensions.kt Maven / Gradle / Ivy
The newest version!
package org.jooq.kotlin
import org.jetbrains.annotations.Blocking
import org.jooq.*
import org.jooq.conf.*
import org.jooq.impl.DSL.*
import org.jooq.migrations.xml.jaxb.*
import org.jooq.util.xml.jaxb.*
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