ARRAY_REMOVE will be supported in the upcoming jOOQ 3.18:
https://github.com/jOOQ/jOOQ/issues/11981

Until then, you can just use plain SQL templating whenever you need to work
with vendor specific functions that aren't supported:
https://www.jooq.org/doc/latest/manual/sql-building/plain-sql-templating/

Field<CustomTypeRecord> f = DSL.val(new CustomTypeRecord("test3", "-1"));
DSL.field("array_remove({0}, {1})", f.getDataType(),
MY_TABLE.CUSTOMTYPECOLUMN, f);


I hope this helps,
Lukas

On Fri, Feb 3, 2023 at 9:30 AM Pragya Gaur <[email protected]> wrote:

> I have a TYPE defined say customtype and have a table where one of the
> columns is customtype[].
> I am trying to find ways where I can execute the below sql query in JOOQ:
>
> update MY_TABLE SET customtypecolumn = array_remove(customtypecolumn,
> ('test3','-1')::customtypecolumn) where <some_condition>
>
> I tried following this link
> https://jooq-user.narkive.com/ScEfUAlX/fastest-way-to-remove-values-from-an-integer-array
> But this way I am getting exception TYPE customtype is not supported in
> dialect POSTGRES
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/78e86317-41d1-41ed-ba6d-f2060ac3018an%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/78e86317-41d1-41ed-ba6d-f2060ac3018an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO51YvCkme6K4YpYZymzQsAZ92wmWuJT1boq_AF3gF%3DPNw%40mail.gmail.com.

Reply via email to