[Geany-Devel] Looking for features for a SQL plugin

Steven Blatnick steve8track at xxxxx
Mon Mar 24 16:12:04 UTC 2014


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:

 1. 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)
 2. Run queries from any open document by highlighting them and using
    some keyboard shortcut and/or button
 3. 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.

That would be a reasonable minimum.  We could extend it from there to:

 1. Show tables in the current database on the side panel, expandable to
    show the columns
 2. Allow editing of the cells in the table output

Some further thoughts:

 1. I used SQLAlchemy for my gedit plugin (it was in python) because it
    allowed connecting to various SQL databases such as MySQL,
    PostgreSQL, etc
 2. 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.
 3. A way to kill the query in progress would be good

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 at frank.uvena.de 
> <mailto:frank at 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 at lists.geany.org <mailto:Devel at lists.geany.org>
>     https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20140324/9016583a/attachment.html>


More information about the Devel mailing list