There is a table in PostgreSQL with ltree field. How to update this field with string value?
DSL.using(configuration)
.update(AREAS)
.set(AREAS.TREE, area.getTree());//getTree() return String
I tried several variants:
val(area.getTree()).cast(field("ltree"))
throwingA org.jooq.exception.DataAccessException has been caught, SQL [update "public"."areas" set "tree" = cast(? as any) where "public"."areas"."id" = ?]; ERROR: syntax error at or near "any"*
inline(String.format("CAST(\'%s\' AS ltree)", area.getTree()))
using excess quotesA org.jooq.exception.DataAccessException has been caught, SQL [update "public"."areas" set "tree" = 'CAST(''1.35.1284739'' AS ltree)' where "public"."areas"."id" = ?]; ERROR: syntax error at position 4*
val(field("CAST({0} AS ltree)", area.getTree()))
throwingA org.jooq.exception.SQLDialectNotSupportedException has been caught, Type class org.jooq.impl.SQLField is not supported in dialect DEFAULT