Source: /cirosantilli/upsert

= Upsert
{c}

= ON CONFLICT UPDATE
{c}
{synonym}
{title2}

`UPSERT` is extremely handy, and reduces the number of find, check on server, update loops. But `RETURNING` is a fundamental part of that (to get the updated/existing) ID. Can't believe SQL hasn't standardized it yet as of 2022. But both <SQLite> and <Postgres> support it with similar syntax thankfully.

\a[nodejs/sequelize/raw/upsert.js]

* https://www.postgresql.org/docs/14/sql-insert.html\#SQL-ON-CONFLICT
* https://www.sqlite.org/lang_returning.html