public static Condition jsonContains(Field<JsonObject> field, JsonObject value) {return DSL.condition("{0} @> {1}", field, DSL.val(value, field));}
where(jsonContains(FOO.BAR, sourceKey))
--
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.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/l-MjmxifiSc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
Hi Lukas,
When i tried with JOOQ,
myClass r = create.insertInto(POSTGRES_TABLE1)
.set(POSTGRES_TABLE1.CREATEDDATE, currentTimestamp())
.set(POSTGRES_TABLE1.REQUEST, DSL.val(activity.request, JSONObject))
.returning().fetchOne()
In the table "POSTGRES_TABLE1" column "REQUEST" is jsonb data type. But unable to insert data using JOOQ, getting the following error.
Error:
Type class org.jooq.tools.json.JSONObject is not supported in dialect DEFAULT
I posted the question here:https://stackoverflow.com/questions/53311203/how-to-insert-a-record-into-postgres-database-with-jooq
On Wednesday, 14 November 2018 16:41:26 UTC+8, Madhu Mohan wrote:Hi Lukas,I written data bindings as in the code attached files, can you tell me how to use the implemented conversion below.My code is as follows.MyRecord r = dslCtx.insertInto(PGTABLE1)
.set(PGTABLE1.JSON_COLUMN, PGTABLE1.JSON_COLUMN).returning().fetchOne()Getting the following error."message": "ERROR: column \"before\" is of type jsonb but expression is of type character varying\n Hint: You will need to rewrite or cast the expression.\n Position: 238",Can you help hereThanksMadhu