jhspetersson / fselect

Find files with SQL-like queries
https://fselect.rocks
Apache License 2.0
4.01k stars 85 forks source link

Is "It's not a real SQL" a feature? #108

Open pavlus opened 3 years ago

pavlus commented 3 years ago

I was thinking about more advanced queries and metadata, and some of them, along with some existing, are playing nicely with more traditional SQL syntax, but it could complicate writing queries for users, or very much complicate parsing and introduce unexpected behavior, if relaxed syntax remained.

Examples:

Arrays

is_image, is_video, etc could be global array variables containing extensions of files, so is_video = true becomes something like ext in _video_exts

Relations

shah commented 2 years ago

I just discovered this fantastic tool and found myself thinking the same thing @pavlus - it would be great if we could offer fselect to our data scientists that already know SQL but are not good at the CLI. For now fselect is already much better than using find at the CLI but the improvements you've suggested in this ticket would be ideal.

rickological commented 2 years ago

I've also very recently discovered this tool and I love it - and for me GROUP BY to work with the aggregate functions it already has would be amazing. I'm new to Rust (from PHP) and learning lots but at present adding the above might be a bit beyond my ability. I am still going to try tho!