Can someone explain how can I use .onConflictDoUpdate with array of values?

If where is conflict somewhere with some value in array how can I use values from that array as new value?
In documentation it shows how to handle that then setting one value but not array of values
// for single value
await db.insert(users)
  .values({ id: 1, name: 'Dan' })
  .onConflictDoUpdate({ target: users.id, set: { name: 'John' } });

but how about this
await db.insert(users)
  .values([{ id: 1, name: 'Dan' }, { id: 2, name: 'Tom' }, { id: 3, name: 'Martin' }])
  .onConflictDoUpdate({ target: users.id, set: ??? }); // if where was conflict on id 2 how can I set new name using values in array
Was this page helpful?