it is something that would ideally be available for the MS SQL and Oracle dialects. We've gotten by implementing specific "upsert" constructs for SQLite, Postgresql and MySQL that are not "MERGE". The thing is MERGE is SQL standard, although I'm not sure it's worth it to make "MERGE" a standard construct (meaning, it would be in sqlalchemy.sql) since it is so seldom used and I would guess MS SQL and Oracle have lots of quirky syntaxes in each (or maybe not).
I think MERGE could be implemented for MSSQL and Oracle and it likely would need to be a sqlalchemy.sql.merge() construct since it is SQL standard.
things to look out for:
- I dont think merge() should try to also "work" on SQlite/Postgresql/Mysql , these DBs dont support the syntax and for those people need to use the dialect-specific insert() constructs
- docs for merge() have to be pretty clear this is not a generally supported construct by the most popular open source databases.
- dialect specific documentation for MSSQL, Oracle should likely have a short section on "upsert" that indicates, "SQL Server supports SQL standard MERGE which sqlalchemy implements as sqlalchemy.sql.merge() (link to main docs)