DT
Drizzle TeamYarulf
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.4The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.3KMembers
View on DiscordWant results from more Discord servers?
More Posts