This seems really nice!<p>If this is posted by the author looking for feedback:<p>1) WebDAV is a much better choice than FUSE. FUSE is a good concept, but buggy and poorly-implemented. Things like sshfs can break in very bad ways if e.g. there is a network connectivity issue. Not a hack.<p>2) Writes seem like a very bad idea. Keep those out unless you come up with a clean way to handle them (which seems difficult if not impossible given the differences in FS versus relational abstractions, especially with regards to data validation). Not a limitation.<p>In other words, the "hacks" seem like design choices a good architect would likely have made. Continuing:<p>3) The major use-case I have is if I have a small (<1MB) database, and don't know the structure. Lots of tools use small sqlite databases. There is no way to query all tables for something, whereas tools like `find` and `grep` can look through all files. I was recently trying to recover some lost data, and it was a pain to find it.<p>4) I think a major theoretical question is how to fuse the two models. I would like to be able to do 'generic' things like the above on databases, while still being able to be relational.<p>5) I don't have an answer to the above, but perhaps natural first step might be to allow something like queries or virtual tables to sit on the file system:<p>wddbfs --anonymous --db-path=/path/to/an/example/database/like/Chinook_Sqlite.sqlite<p>wddbfs_query myjoin "SELECT * FROM table_1, table_2 WHERE table_1.id=table_2.id"<p>And voila! A /virtual/myjoin.csv file pops up.<p>(Even more) half-baked thoughts:<p>There might be more clever ways to do it too. I'm thinking through half-baked thoughts on how to make files and tab completion work. My half-baked thoughts are moving towards something like:<p>wddbfs_SELECT * from Customer.tsv\, Employee.tsv WHERE<p>But I don't like all the potential bugs with escaping. I'm also thinking about when output wants to go to the console versus into a virtual table.
I'm also working on something like this:<p><a href="https://github.com/Airsequel/SQLiteDAV">https://github.com/Airsequel/SQLiteDAV</a><p>My mapping is:
table -> dir,
row -> dir,
cell -> file
I build a couchDB webdav server back in the day, you could also edit json documents or file blobs directly. the problem i discovered was that all OSes totally staled their webdav support and there are also enough differences between oses to be annoying. In the end to build somthing with great performance you would also need to control the webdav client side and probably build a fuse webdav client. I would have loved to see webdav maturing and becoming what the 9P vision was just for the web, but this obviously never happened as all the applications just went into to the web and used rest intead of webdav and everything else moved to sync protocols that sync to local folders.
> Although for now, the whole table gets read into memory for every read so this won’t work well for very large database files. There’s also no write support… yet.<p>At such a set of features I would prefer a tool that converts databases to a directory of real csv and jsonl files, at least there are no performance issues to worry about
I really like the idea of running a watch on an sqlite table with my common cli tools.
If I understand correctly, it is being re-read on every request. Does that mean that changes to the sqlite database will be visible on the next read of a csv file?
I was expecting this to be a way to mount so-called SQL Archives (<a href="https://sqlite.org/sqlar.html" rel="nofollow">https://sqlite.org/sqlar.html</a>) but this is just as cool.
> the SQL syntax for selecting a few records is much more verbose than head -n or tail -n<p>I use DBeaver to inspect SQLite files, and to also work with Postgres databases.<p>I kind of miss MySQL Workbench, but MySQL is pretty dead to me. And SQL Server Management Studio is a relic that keeps being updated.<p>I also sometimes make dashboards from SQLite files using Grafana, but the time functions for SQLite are pretty bad.
> Part of this is avoiding the overhead of figuring out a relational schema, but an equal amount of friction comes from the fact that .sqlite files are just slightly more difficult to inspect<p>I like this solution to that problem:<p><a href="https://sqlitebrowser.org/" rel="nofollow">https://sqlitebrowser.org/</a>
Wasn't there an extension that let you mount a filesystem as a table or db in sqlite? I wonder how far you can inception that. Mount a db as a filesystem, then mount that filesystem as a db..etc.
Cute, seems legitimately useful, succinct. Not everything has to be super technically challenging to be valuable. I can see how this would be really handy.