SELECT
t.id, array_agg("data"."_rowId"), t.name
FROM "data"
CROSS JOIN
json_to_recordset("data"."habitas") as t("id" text, "name" text)
GROUP BY t.id, t.name
fun crossJoinSpec(): TableLike<Record> {
val _sb = StringBuilder("{json_to_recordset}({0}) as {1}(")
columns.forEachIndexed { i, selectField ->
if ( i != 0 ) _sb.append(", ")
_sb.append(selectField)
_sb.append(" ")
_sb.append(selectField.dataType.castTypeName)
}
_sb.append(")")
return DSL.table(_sb.toString(), sourceField, columns.first())
}
table("json_to_recordset({0})", DATA.HABITAS).as("t", "id", "name")
--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
.groupBy(*columns.map { DSL.field(DSL.name(sourceField.name,it.name))}.toTypedArray())
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.