jokedst / CsvQuery

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

SQL newline and whitespace support, plans for newer sqlite libraries #27

Open tomknight85 opened 3 years ago

tomknight85 commented 3 years ago

Hi, CSV Query is an excellent tool. I now use it almost daily.

I just have a few questions about possible enhancements:

Thanks for this tool, it is very useful and versatile.

Tom

jokedst commented 3 years ago

Hi! Thanks for liking the plugin! :)

The text box can probably be made larger... I'll try and see if there is some appropriate windows text box control. I'm not much of a UI guru to be honest.

Yeah, the recent statements is crap. But I don't know how to improve it really... Right now it just remembers the 100 last statements and does a prefix search. Any ideas are welcome!

If you want to query the DB outside of the text box there is no support in CsvQuery itself, no. But in settings you can change the DB from ":memory:" to a file name, then use regular SQLite to query it. It should work while Notepad++ is running. SQLite hasn't changed the file format, and has promised never to, so it should work fine.

As for updating SQLite, unless they update the port (which seems unlikely by now - last update was 2011) I can't update. :( If you want state of the art SQL you can install MS SQL Server locally (dev version is free) and switch to using that in the settings, but then you have to use SQL Server syntax for SQL instead of SQLite syntax.

tomknight85 commented 3 years ago

Thanks @jokedst ! That information about changing the DB provider is exactly what I need. I'll give it a go when I have a chance (we're most Oracle based here so I'll need to pivot a bit to SQL Server). I'm really only missing the analytic functions that are not included in the older build of SQLite.

The GUI isn't that bad at all. I look at CSV query as an initial tool that is easy to jump into to verify the structure and perform some basic transform to flat files. Its simplicity is one of its strengths and it enriches Notepad++ incredibly. Colleagues of mine have resorted to using it when their 'enterprise' ETL tools cannot parse large flat files and run out of memory - we're huge fans!

With the recent statements, I'm wondering about the possibility of an option to create them as a table when csvquery is initallised and append to it on subsequent queries? That would allow us to query our recent statements when we want to and see them in full in the output window. If the database is not in-memory then it could only append to any existing recent statements table. Just an idea, it would allow for a viewable manifest of queries recently performed. I guess it could introduce some performance degradation when CSV Query is launched.

I'm mostly only blue-skying here. I really appreciate your answer above. :D

Thanks again, Tom