jhspetersson / fselect

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

[Feature/Improvement] Generic "NOT"/Negation #114

Closed danieldjewell closed 3 years ago

danieldjewell commented 3 years ago

I searched through the issues and couldn't find anything on this (but also searching issues for "not" turns up just about every issue...)

One notable thing missing is support for generic negation in WHERE clauses - yes, there are two specific NOT operators (notlike and notrx) and I suppose ne/!=... But one cannot use say WHERE NOT name = abc ... Granted, the same functionality is there (WHERE name != abc) ... but having the generic negation NOT would be nice. (It would also make the syntax of fselect closer to real SQL ... writing WHERE NAME NOT LIKE vs the custom notlike -- I'm 99.9% sure that all SQL variants support a generic NOT operator.)

I really do love this program and a huge part of the reason I like it is because I can quickly do searches without having to pull up man find to figure out which flag I need. But a huge part of that convenience is based on being as close to generic SQL as possible.

Just a thought :)

jhspetersson commented 3 years ago

Thank you for this suggestion! Although there was a special hack for WHERE NAME NOT LIKE syntax, now generic NOT can be used as well. Rather close to the real SQL :)