You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am struggling to set up the SET part of my on conflict definition dynamically.
Everything else working smoothly, but failing to pass upsert information.
Would welcome any help.
consttargetTable="test"constcolumns=["id","name","geometry"]constonConflict={keys: ["id"],update: ["name","geometry"]}awaitsql` INSERT INTO ${sql(targetTable)}${sql(data,columns)} ON CONFLICT (${sql(onConflict.keys.join(","))}) DO UPDATE SET ${sql(onConflict.update.map(column=>`${column} = EXCLUDED.${column}`).join(",")};`
The text was updated successfully, but these errors were encountered:
I am struggling to set up the SET part of my on conflict definition dynamically.
Everything else working smoothly, but failing to pass upsert information.
Would welcome any help.
The text was updated successfully, but these errors were encountered: