Exercise: Walk to Wal-Mart
Piano Song of the day: Let It Go (161 / 182)
Yes, I'm playing songs from Frozen, reasonably well considering that it's a bit of a dirge. Why, well it's Disney week on my Piano App and I thought I'd give it a go. Hopefully, we'll get to some of the more well know classic Disney songs (from my youth).
I've been playing with the JSON commands in MySQL, and I'm really beginning to wonder if they could have made it uglier if they tried. MySQL is a relational database and was never really designed to store JSON data. Then MongoDB came along and everything in MongoDB is JSON and it has a sweet syntax of accessing and updating the contents of fields.
MySQL does not.
Sure MySQL has things like column->"$.field.subfield" to fetch a sub-field nested in a JSON structure and you can even say things like column->"$.*.foo" but it isn't actually that useful in practice.
The thing is that its is OK for getting data, but you want to use the same syntax for setting data, eg:
column->"$.field.subfield" = 42;
But no you can't do that, that would be too easy and consistent, no you need to do:
column = JSON_SET(column, "$.field.subfield", 42)