Many of the sqlite json1 functions accept a path parameter, which the
documents describe as:
For functions that accept PATH arguments, that PATH must be well-formed or
else the function will throw an error. A well-formed PATH is a text value
that begins with exactly one '$' character followed by zero or more
instances of ".objectlabel" or "[arrayindex]".
I was wondering if there were any plans to support wildcard paths?
Postgres v12 release looks like it has a pretty sophisticated jsonpath
SELECT jsonb_path_query(x, '$.** ? (@.name == "a")') FROM test;
SELECT jsonb_path_query(x, '$.sizes[1 to last]') FROM test;
MySQL allows wildcards in a couple flavors.
Do you anticipate anything like this landing in sqlite's json extension?
I still think that, in spite of the absence of a clear standard, sqlite
could benefit from more sophisticated path support.
Sqlite's json functions seem modeled after the MySQL json functions. Since
MySQL supports some nice features (wildcard, prefix/suffix match), it does
seem reasonable that sqlite might support similar behavior.
And, as you mentioned, sqlite tends to follow postgres as a kind of
standard, so once 12.0 lands it would be cool to see sqlite offer similar
json path support.
Anyway, I understand that there are perhaps many other things that are much
higher priority. Love the window functions, on conflict, etc which have
been added in the last few releases. Amazing stuff. Just wanted to see if
json path would be even on the road map.
On Mon, Apr 15, 2019, 4:57 AM Dominique Devienne <[hidden email]>