Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite backend in the future? #127

Open
jgranduel opened this issue Jun 14, 2022 · 3 comments
Open

SQLite backend in the future? #127

jgranduel opened this issue Jun 14, 2022 · 3 comments

Comments

@jgranduel
Copy link

Hi,

As fselect is SQL oriented, could a SQLite backend be conceivable as an alternate direct output format for storing and querying fselect results? Many use cases would be possible for having a better knowledge of a might be large dataset. SQLite could be easily updated from a new run of fselect. Importing into SQLite from CSV files is not ideal.
What's your feeling about it?
Thanks

@jhspetersson
Copy link
Owner

Hi, that's an interesting question, what should be a backed for what :) While importing CSV or JSON is not ideal (but pretty straightforward) operation, exposing fselect's functionality as a virtual table provider might be more profitable solution. Here we get joins and other SQL goodies for free.

@jgranduel
Copy link
Author

Hi,
sorry for the late answer. Default output might end into a SQLite table for convenience for avoiding retraversing thousand if not millions of folders and extracting metadata from files. So for the (lazy) admin, having an SQLite export would be quite useful, something like fselect name, abspath, user from . into whatever.sqlite. Maybe an upsert? Rust is well equiped for this backend! Thanks

@Dialga
Copy link

Dialga commented May 19, 2023

You can use nushell for that, something like nu -c 'fselect name,size . into csv | from csv | into sqlite ls.db'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants