How to take input parameter in table valued functions in jooq

20 views
Skip to first unread message

deepankar gupta

unread,
Mar 18, 2024, 8:53:56 AMMar 18
to jOOQ User Group
Hi Lukas,

We have a custom sql having table valued function in it which we are trying to parse in jooq using parseSelect `context.parser().parseSelect(customViewSQL);`.
 
When we have custom sql like this:
SELECT * FROM Table_valued_function ('Al%');
Error: It is not able recognize Table valued function

When we have custom sql like this SELECT Table_valued_function ('Al%'); It is working fine but not in desired format. We are expecting it in table and it is coming as tuple.


Regards
Deepankar Gupta

Lukas Eder

unread,
Mar 18, 2024, 9:01:23 AMMar 18
to jooq...@googlegroups.com
Hi Deepankar,

Thank you for your message. Our parser doesn't support user-defined table valued functions yet, see:

But you can implement your own ParseListener to intercept the parsing of Table expression and implement your own behaviour easily:

I hope this helps,
Lukas

--
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/38608a57-757d-4882-ac85-eae8edf82bcdn%40googlegroups.com.

deepankar gupta

unread,
Mar 18, 2024, 9:07:28 AMMar 18
to jOOQ User Group
Hi Lukas,

Does jooq parser support other than user-defined table valued functions like functions which has return type as text or boolean?

Regards
Deepankar Gupta

Lukas Eder

unread,
Mar 18, 2024, 9:14:21 AMMar 18
to jooq...@googlegroups.com
You can specify the Settings.parseUnknownFunctions flag to tell jOOQ's parser to ignore unknown scalar functions

Reply all
Reply to author
Forward
0 new messages