await db
.insert(items)
.values(
chunk.map((item) => ({
auctionHouseId: Number(auctionHouseId),
itemId: item.itemId,
// ...
})),
)
.onConflictDoUpdate({
target: [items.itemId, items.auctionHouseId],
set: {
// What do I put in here? This is outside of the `map` context
},
});
await db
.insert(items)
.values(
chunk.map((item) => ({
auctionHouseId: Number(auctionHouseId),
itemId: item.itemId,
// ...
})),
)
.onConflictDoUpdate({
target: [items.itemId, items.auctionHouseId],
set: {
// What do I put in here? This is outside of the `map` context
},
});