Issue with 'insert on conflict do update where'
I am using
db.insert(lastHeaterMetricsTable)
.values(heaterEntityWithMaxTime)
.onConflictDoUpdate({
target: lastHeaterMetricsTable.deviceId,
set: heaterEntityWithMaxTime,
where: lt(
lastHeaterMetricsTable.receivedAt,
heaterEntityWithMaxTime.receivedAt,
),
})
.execute()
But as the query result I get the following:
where
statement is before do update
, that's why query failes. Drizzle ORM 0.25.40 Replies