Closed
Description
I'm trying to get the benefit of using sqljson.Append
function to merge my jsonb
column with the new value during the upsert
operation and when the ON CONFLICT
triggers.
sqljson.Append
function accepts *sql.UpdateBuilder
as the first argument. I couldn't find a way to access the builder during the Upsert operation and it seems that unlike update operation, Modify
method is not generated for Upsert.
Is there anyway to access the UpdateBuilder
during upsert to use it here:
Update(func(eu *ent.EntityUpsert) {...})
or otherwise, is it possible to add a method such as GetBuilder
to *sql.UpdateSet
. e.g.
Update(func(eu *ent.EntityUpsert) {
sqljson.Append(eu.UpdateSet.GetBuilder(), ...)
})
Metadata
Metadata
Assignees
Labels
No labels