Gavin Ray
11/15/2022, 7:26 PMOverload resolution ambiguity
for a function that has two varargs
single-argument signatures?
Overload resolution ambiguity. All these functions match.
public open fun <T : Any!> array(vararg values: TypeVariable(T)!): Field<Array<(out) TypeVariable(T)!>!> defined in org.jooq.impl.DSL
public open fun <T : Any!> array(vararg fields: Field<TypeVariable(T)!>!): Field<Array<(out) TypeVariable(T)!>!> defined in org.jooq.impl.DSL
It works in Java, but not in Kotlin. I can't use null
or `emptyArray()`/`emptyList()` because that produces the wrong results =/ephemient
11/15/2022, 11:31 PMDSL.array(*emptyArray<T>())
DSL.array(*emptyArray<Field<T>>())
but looking at the javadoc, there's a non-varargs overload that you could use instead, if that is your intended result
DSL.array(emptyList<T>())
(but what use is an empty array in jOOQ?)Gavin Ray
11/30/2022, 8:06 PM(but what use is an empty array in jOOQ?)Ah, I need it to coalesce potentially
null
aggregation results in a JSON
object, for a custom SQL dialect that isn't supported by default
coalesce(some_agg_column, [])