Hello,
The code generation for table valued functions seems to be inaccurate as jooq generates calls for stored procedures instead.. The only way I found was to manually write a low-level String-Select-Statement but that's a bad practice..
We are using jOOQ 2.6. Today I tried to update to 3.0, hoping to resolve this issue, by replacing the jOOQ-jars in the Maven-repository and updating the jooq-references in the jooq-config-files. But after that jOOQ only generated the system-folders and no tables or routines were generated.. So I reverted the update back to 2.6.
Is there any way to generate code for table valued functions including the table-schema from the returned datatable? If yes, can we stick to 2.6 or do we need to update to 3.0. If update is required, please give me a hint, what went wrong when I tried to update.
Kind regards
Michael
--
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+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
CREATE FUNCTION f_tables5 (@v1 INTEGER, @v2 INTEGER, @v3 INTEGER) RETURNS @out_table TABLE ( v INTEGER, s INTEGER ) AS BEGIN INSERT @out_table VALUES(@v1, @v1), (@v2, @v1 + @v2), (@v3, @v1 + @v2 + @v3) RETURN END
FTables5 fTables5(Integer v1, Integer v2, Integer v3) { // ... }
This method would instanciate a table-valued function call, from which users can then typesafely dereference columns, e.g.
where(fTables5(1, 2, 3).S.eq(6))