probcomp / bayeslite

BayesDB on SQLite. A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself.
http://probcomp.csail.mit.edu/software/bayesdb
Apache License 2.0
921 stars 63 forks source link

common table expressions #50

Open riastradh-probcomp opened 9 years ago

riastradh-probcomp commented 9 years ago
WITH t AS (SELECT ...); SELECT ...

Requires a newer version of sqlite3 than is in Ubuntu 14.04.

gregory-marton commented 8 years ago

In particular, what version of sqlite3 does it require? What's the feature that's needed?

gregory-marton commented 8 years ago

Does apsw support it? https://github.com/probcomp/bayeslite/issues/92

riastradh-probcomp commented 8 years ago

This requires sqlite3 >=3.8.3, whereas Ubuntu 14.04 has 3.8.2. The feature is what I named and quoted, and is documented at https://www.sqlite.org/lang_with.html. It is basically let for tables.

riastradh-probcomp commented 8 years ago

And no, apsw doesn't help -- it's sqlite3 itself, not the Python sqlite3 module, that needs CTE.

riastradh-probcomp commented 8 years ago

(and the version of apsw in Ubuntu 14.04 is built with the same version of sqlite3 as the version of sqlite3 in Ubuntu 14.04)

riastradh-probcomp commented 8 years ago

We no longer necessarily rely on the system sqlite3. It would still be nice to be able to use it, to reduce the number of external dependencies that are not managed by apt (in particular, bayeslite-apsw), but that matters less now.