Update jsonb value in PostgreSQL using JOOQ

Viewed 239

In my Java project I'm usinq JOOQ and I want update JSONB value. But my build failure.

I wrote a code:

DSL.using(connection).update(USER_SETTINGS)
                .set(USER_SETTINGS.SETTING_VALUE, field("{\"filtersValue\":{\"page\":0,\"size\":100}, \"visibleCount\":100}", JSONB.class))
                .where(USER_SETTINGS.USER_ID.eq(98383L))
                .execute();

enter image description here

and I got a next message:

org.jooq.exception.DataAccessException: 
SQL [update "sbcm_sys"."user_settings" set "setting_value" = "filtersValue":{"page":0,"size":100, "visibleCount":100} where "sbcm_sys"."user_settings"."user_id" = ?]; ERROR: syntax err
or at or near ":"
  Position: 71
Caused by: org.postgresql.util.PSQLException: 
ERROR: syntax error at or near ":"
  Position: 71

Where I made a mistake?

1 Answers
Related