by baubu · 13y ago · 0 comments
This is the most fundamental mutation operation on dictionary, in all programming languages, denoted by:
map[key] = value
It's truly mystifying how something so basic could be missing from something that is supposed to be a better system for storing data.
It also doesn't even fully implement the SQL standards, missing for example the MERGE statement in SQL 2003 standard, which is also utterly baffling.
Note that all databases have catastrophic issues like these, it's just ridiculous how they can be in this terrible state.
https://gist.github.com/paul/855efdecaaa2ec4deec7
You can also use it to perform a "find or insert" as a single atomic action:
It would be like a commercial RDBMS lacking boolean and serial types, necessitating reams and reams of repetitive, error-prone boilerplate constraints and insert/update triggers.