On 31.10.2013 18:37, Nico Williams wrote:
On Wed, Oct 16, 2013 at 07:28:04AM -0400, Richard Hipp wrote:
Please see http://www.sqlite.org/src/artifact/2ece66438?ln=13-75

I've been thinking for a while -ever since I happened upon jq(1)- that a
marriage of jq and SQLite3 would be wonderful.

jq is a JSON query language.  It's a functional language.

In my mind this would consist of:

  - a jq function for sqlite3
  - a jq array grouping aggregate function for sqlite3
  - a jq virtual table for sqlite3 (for, e.g., disaggregating values)
  - a jq binding for sqlite3 (so SQLite3 can be invoked from jq)

The IN array binding could then be handled like this:

sqlite3> SELECT * FROM foo WHERE jq('contains($arg1), :in_list, column1);

The value bound to :in_list would be a JSON array or object (faster for
larger sets) of values.

I am sure, there are many SQLite users waiting with hope :-) for an extension handling semi-structured data.

BTW, I think some functionality are already online trough libspatialite's VirtualXPath virtual table [1].

Might be some code reuse could be possible for the JSON case.

Are there enough interest for something like informal SIG about Tree/Graph data processing in SQLite?

Kind Regards,
Alek

[1] https://www.gaia-gis.it/fossil/libspatialite/wiki?name=VirtualXPath-intro

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to