diff --git a/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt b/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt index 05dafe4779..3b3ecb56b4 100644 --- a/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt +++ b/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt @@ -59,6 +59,12 @@ fun ResultQuery>.fetchMap(): Map = collect(Records.in @Blocking fun > ResultQuery.fetchSet(): Set = collect(Records.intoSet()) +@Blocking +fun > ResultQuery.fetchValue(): E? = fetchOne { it.value1() } + +@Blocking +fun > ResultQuery.fetchSingleValue(): E = fetchSingle { it.value1() } + // ---------------------------------------------------------------------------- // Extensions to collect Result into other types // ----------------------------------------------------------------------------