kotysa icon indicating copy to clipboard operation
kotysa copied to clipboard

Support upsert functionality

Open dzikoysk opened this issue 3 years ago • 2 comments

At this moment I don't think it is possible to use upsert functionality using a DSL. It's quite useful as most of the popular SQL implementations somehow support this:

MySQL, MariaDB, H2 (with MySQL dialect): ON DUPLICATE KEY UPDATE ... PostgreSQL, SQLite: ON CONFLICT [ON CONSTRAINT] ...

dzikoysk avatar Aug 12 '21 11:08 dzikoysk

Interesting, I will give it a try !

pull-vert avatar Aug 16 '21 13:08 pull-vert

Not sure if it might be helpful, but it's something I had to deal with in Exposed as it's still not supported oficially. Here's my implementation:

  • https://github.com/reposilite-playground/exposed-upsert

You may see how to deal with it in various DBs implementations and how it is supported these days 🤔

dzikoysk avatar Aug 16 '21 13:08 dzikoysk