CsvQuery icon indicating copy to clipboard operation
CsvQuery copied to clipboard

[Suggestions] CsvQuery Combo box optimizations

Open wonkawilly opened this issue 1 year ago • 1 comments

I'd like to advance the following proposal about the behavior of the CSV Query combo box where the user types the sql to execute

  • Every time the query is executed by hitting ENTER on the keyboard or clicking on the Execute button, the Box used to write the query looses the focus and must be clicked again to regain focus and to correct the query or type a one, Such behavior is not much good: IMHO would be better to let the focus and the caret into the field unless the user hits TAB or clicks elsewhere
  • Please make the box multi-line capable so that the typed sql can be subdivided into multiple lines and be more comprehensible to write and analyse, especially on complex long queries one liner can be more prone to errors and more difficult to correct: indeed a query typing like this SELECT * FROM THIS WHERE FIELD1 = 'FILTERCRITERIA' SORT BY FIELD2 ASC is far less comprehensible than the same query typed like this SELECT * FROM THIS WHERE FIELD1 = 'FILTERCRITERIA' SORT BY FIELD2 ASC
  • On the left side of the grid view Show row numbers by default
  • Implement a feature to allow direct editing of the data contained into cells just by double-clicking on a target cell: after exiting the cell the csv file has to be updated accordingly in the usual notepad view.
  • Implement a feature to allow update of data by using UPDATE queries
  • Make CsvQuery use the SQLLite.dll library as separated file to just coping / installing it into the same directory of the CsvQuery.dll so in case of need can be updated on its own just replacing the old sqllite.dlll file with the updated one.

Thank you.

wonkawilly avatar May 31 '23 13:05 wonkawilly

1 - Good idea, easy to fix. 2 - I've heard this a few times now. I guess other people use this for far more advanced stuff than I ever do... I'll check how much work that would be. 3 - I could add a setting for it. I don't want them. :P 4 - That's... a really cool idea, but if you manipulate the data in the SQL (e.g. a join or a sum), it would be impossible to backtrack. It's rather hard to backtrack on a simple "SELECT * FROM THIS", I don't save line numbers or anything in the DB tables. 5 - You can run "update" queries, but you have to go against the underlying table, not the magic "THIS" view, e.g. "UPDATE T1 SET Col1 = 123". If you want the changed data in CSV format, use the "Create new CSV" feature 6 - This would require a major rewrite of CsvQuery. I've even modified the (embedded) SQLite code, it's not "pure" SQLite anymore... CsvQuery was never meant to be a hardcore SQL tool, it was meant to do simple analysis of CSVs. If you need stuff like this, import the CSV into a real DB :) (in settings you can write a filename instead of ":memory:" - then you get a SQLite file you can import somewhere else)

jokedst avatar Jun 09 '23 12:06 jokedst