Which I think is a much more useful case than the original one he blogged about.
Except you don’t need virtual columns to do it; they’re just syntactic sugar. I’ve been doing it for years by putting the json_extract call in the CREATE INDEX statement.
I was going to ask this, I didn’t understand the point of creating virtual columns.
I think being explicit is better in general. Except maybe if you use virtual columns for compatibility reasons.
Yes, but virtual columns seem like a “syntactic sugar” feature all together. It just wraps some complexity that you can, of course, implement somewhere else.
Agreed. Just thought I’d comment since the article could be misread as saying that indexing JSON properties requires virtual columns.
I definitely misunderstood this. Thank you for clarifying!