Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tomknight85 opened this issue Feb 4, 2021 · 2 comments
Open

Comments

@tomknight85
Copy link

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

I just have a few questions about possible enhancements:

  • The current text box for executing the queries is just a little too small when utilising long statements without its support for newlines and whitespace. It is a little difficult to view recent statements. Has there been any thought to extend this functionality to include whitespace support? And somewhat related, is there any way to execute a query to the running sqlite instance apart from using the provided text area and execute button?
  • Is there any plan or appetite to incorporate a newer build of SQLite into CSVQuery? I note that the C# SQLite library you use has not been updated in a while and I imagine that changing libraries would be difficult.

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

Tom

@jokedst
Copy link
Owner

jokedst commented Feb 4, 2021

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants