Quea
Quea
DTDrizzle Team
Created by Quea on 6/7/2023 in #help
onConflictDoUpdate array
Hi, is it possible to upsert/update an array?
await db.insert(organizations).values(organizationsResponse.organizations).onConflictDoUpdate({
target:[organizations.id],
set:{
name:organizationsResponse.organizations.map(org=>org.name)

}
});
await db.insert(organizations).values(organizationsResponse.organizations).onConflictDoUpdate({
target:[organizations.id],
set:{
name:organizationsResponse.organizations.map(org=>org.name)

}
});
I would want it to do it for all and not one by one
19 replies