jokedst / CsvQuery

Plugin for Notepad++ that treats CSV files as (read only) SQL tables
152 stars 28 forks source link

[Suggestions] CsvQuery Combo box optimizations #44

Open wonkawilly opened 1 year ago

wonkawilly commented 1 year ago

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

Thank you.

jokedst commented 1 year ago

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)