Hi Leandro,
You can use jOOQ's "plain SQL" capabilities to create your own predicates:
http://www.jooq.org/doc/latest/manual/sql-building/plain-sql
In your case:
public static <T> void Condition arrayOverlaps(Field<T[]> left, Field<T[]>
right) {
return DSL.condition("{0} && {1}", left, right);
}
And call it as such:
arrayOverlaps(OBJECTS.TAGS, DSL.val(new String[] { "tag5", "tag3" }));
Hope this helps,
Lukas
2016-05-26 17:24 GMT+02:00 Leandro Aguilar <[email protected]>:
>
> Hi to all, how can I implement the following function with jooq 3.8.1 ?
> tags column is an array of strings.
>
> SELECT
> *
> FROM
> public.objects
> where tags && '{tag5,tag3}'::varchar[] ;
>
>
> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>
--
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].
For more options, visit https://groups.google.com/d/optout.