On 25 March 2014 03:12, Steven Blatnick steve8track@yahoo.com wrote:
I wrote an sql plugin for gedit a while back which was based on my experience with Microsoft's SQL client. Basically the approach I took, and I think this would work for geany as well, was:
Manage various connections to databases and allow switching between the connections - the connection is global to geany (Actually, I think my first plugin only allowed one connection, and later when I tried to remake the plugin for gedit3, I allowed multiple connections to be managed) Run queries from any open document by highlighting them and using some keyboard shortcut and/or button
IMO it would be better if the query was copied to an editable (pane/entry) since whenever I have sql in code it usually has part of the query generated by code and this would need interpolating for the query to make sense at edit time.
Display the results in a scrollable gtk table in the bottom pane. This was especially beneficial as the ASCII presentation from the command line is hard to see when it starts wrapping.
Or a separate editor buffer??
That would be a reasonable minimum. We could extend it from there to:
Show tables in the current database on the side panel, expandable to show the columns
Editable if supported by the underlying database, what about creating tables as well?
Allow editing of the cells in the table output
Which is where outputting to the edit buffer helps, save means commit changes?
Some further thoughts:
I used SQLAlchemy for my gedit plugin (it was in python) because it allowed connecting to various SQL databases such as MySQL, PostgreSQL, etc If there is a way to make the output in a table on a separate thread to not lock the UI, that would be good for larger result sets. We could at least create some optional built in limit of how many results. A way to kill the query in progress would be good
In current Geany thats best handled as a subprocess, which is also a good way of handling multi-database configurability, just run the command for the particular database.
Cheers Lex
Thanks,
Steve
On 03/24/2014 06:25 AM, Federico Reghenzani wrote:
+1
do you think a simple text console (as mysql cli client) or some kind of graphics?
On Mon, Mar 24, 2014 at 9:47 AM, Frank Lanitz frank@frank.uvena.de wrote:
Hi folks,
A often wished feature at our boothes at e.g. Chemnitzer Linux Tage were to have some kind of a SQL plugin for Geany, supporting executing queries at the database. As I'm also looking for something like this, I'm wondering what do you think such a plugin should be able to do in some global view. I don't think we will be able to build up another MySQLWorkbench or PGAdmin -- and this is also not my goal for a Geany plugin -- but most likley more than an execution of queries might would be useful.
Cheers, Frank _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel