[jOOQ/jOOQ#14777] Add <E, R : Record1<E>>ResultQuery<R>.fetchValue(): E?

extension method to kotlin
This commit is contained in:
Lukas Eder 2023-03-13 09:08:30 +01:00
parent d8341ce9ee
commit dbd045f717

View File

@ -59,6 +59,12 @@ fun <K, V> ResultQuery<Record2<K, V>>.fetchMap(): Map<K, V> = collect(Records.in
@Blocking
fun <E, R : Record1<E>> ResultQuery<R>.fetchSet(): Set<E> = collect(Records.intoSet())
@Blocking
fun <E, R: Record1<E>> ResultQuery<R>.fetchValue(): E? = fetchOne { it.value1() }
@Blocking
fun <E, R: Record1<E>> ResultQuery<R>.fetchSingleValue(): E = fetchSingle { it.value1() }
// ----------------------------------------------------------------------------
// Extensions to collect Result<Record[N]> into other types
// ----------------------------------------------------------------------------