Does jooq support user defined functions ?

8 views
Skip to first unread message

suman choudhary

unread,
Mar 19, 2024, 6:47:47 AM3/19/24
to jOOQ User Group
Hi Lukas,

Does JOOQ support custom functions that returns List?

Thanks and Regards,
Suman Choudhary

Lukas Eder

unread,
Mar 19, 2024, 6:49:01 AM3/19/24
to jooq...@googlegroups.com
Thanks for your message.

Can you provide an example of what you're trying to do, please


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/42b6db7e-9e79-4ae9-a5e8-b542c8d85386n%40googlegroups.com.

suman choudhary

unread,
Mar 19, 2024, 8:08:57 AM3/19/24
to jooq...@googlegroups.com
Hi Lukas,

Below is the sample custom function 

CREATE OR REPLACE FUNCTION get_employee_names() RETURNS TABLE (name text) AS $$ BEGIN RETURN QUERY SELECT name FROM employees; END; $$ LANGUAGE plpgsql;

Regards,
Suman Choudhary 

Lukas Eder

unread,
Mar 19, 2024, 8:10:12 AM3/19/24
to jooq...@googlegroups.com
Hi Suman,

The code generator supports generating this function, and you can then use it in a query, yes. Do you have a specific question about this?

Reply all
Reply to author
Forward
0 new messages