kotysa
kotysa copied to clipboard
Support upsert functionality
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] ...
Interesting, I will give it a try !
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 🤔