kashav/fsql

Misc. enhancements

Closed this issue · 1 comments

Various enhancements and bugs that I've come across, feel free to comment below (or create a new issue) for suggestions or bugs.

  • Bug: Exclude skips files with similar names (e.g. excluding .git results in .gitignore not being listed).
  • Add unit tests (test files are empty right now).
  • Add support for regex in string comparisons (e.g. ... ENDSWITH jsx?).
  • Handle errors more gracefully (instead of just panicking everything).
  • Add support for OR / AND / () (for precedence) in condition statements (lexing is already done for these, just need to add the parsers).
  • Add support for times/dates (to query file creation/modification time).
  • Introduce new attributes to select from (creation/modification time, file mode, basically whatever else os.FileInfo supports).
  • Bug: Space-separated queries. Currently something like "... WHERE time > May 1 ..." is broken since we're splitting conditionals by space. Fix by allowing single quotes and backticks in query strings, so something like "... WHERE time > 'May 1' ..." works and evaluates the conditional to have value of "May 1".
  • Add NOT operator for negating conditionals.
  • Add support for querying and selecting using other size units (only supports bytes right now, add functionality for KB, MB, and GB as well).
  • Bug: Selecting from a directory and it's subdirectory results in duplicates and malformed output.

Moved from the README to this issue as of b78a987.

Closing in favour of individual issues. See #5.