Skip to content

How to implement custom conflict mechanisms? #1674

Answered by groue
pedrommcarrasco asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @pedrommcarrasco,

GRDB does not currently support the WHERE clause of the upsert statement, so there is no direct equivalent of this Drizzle ORM construct.

A possible solution is to perform multiple requests instead of one upsert (thus implementing the logic in the app, instead of letting the database handle it).

I hear the feature request for upsert conditions, though 👍

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@pedrommcarrasco
Comment options

@pedrommcarrasco
Comment options

@groue
Comment options

Answer selected by pedrommcarrasco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants