String[] array = {"foo", "bar", "baz"}; Map<Field<Object>, Object> map = new HashMap<>(); map.put(DSL.field("a"), 1); map.put(DSL.field("b"), array); map.put(DSL.field("c"), 2);
Condition condition = map .entrySet() .stream() .reduce( DSL.trueCondition(), (c, e) -> c.and(e.getKey().contains(inline(e.getValue()))), (c1, c2) -> c1.and(c2) ); System.out.println(condition);
// [#1107] Some dialects support "contains" operations for ARRAYs
if (lhs.getDataType().isArray()) {
return new PostgresArrayContains();
}
// [#1107] Some dialects support "contains" operations for ARRAYs
if (lhs.getDataType().isArray() || rhs.getDataType().isArray()) { return new PostgresArrayContains();
}DSL.condition("{0} @> {1}", left, right);
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.