3 ms·
How close is Python SQLite and Datasette Lite to accessing a hosted SQL database using HTTP range requests as can be done in sql.js like https://github.com/phir
by thadk 4y ago
How close is Python SQLite and Datasette Lite to accessing a hosted SQL database using HTTP range requests as can be done in sql.js like https://github.com/phiresky/sql.js-httpvfs https://github.com/phiresky/sql.js-httpvfs?
I put together a Pyodide-based web app where users need a few indexed queries from a 600mb SQLite database but it isn't very practical for them to download the whole thing into the browser. I would datasettify it and access it by API, if I wasn't relying on a pyodide library that needs direct SQLite access.
https://observablehq.com/@thadk/life https://observablehq.com/@thadk/life
- simonw 4y agoI have an open issue for that here: https://github.com/simonw/datasette-lite/issues/28 https://github.com/simonw/datasette-lite/issues/28 My initial hunch is that this will be really difficult - probably require a fork of something like https://github.com/coleifer/pysqlite3 https://github.com/coleifer/pysqlite3 then compiled for WebAssembly. I'm confident it's feasible, but I don't have the skills to figure it out myself.
- db65edfc7996 4y agoThis was also my immediate thought. Being able to statically deploy larger databases without a server process would be an absolute dream. Approaching dangerously high levels of dark magic.