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

Steven Blatnick steve8track at xxxxx
Wed Mar 26 00:03:11 UTC 2014


In the mean time...

The plugin I've been working on (external-tool 
<https://github.com/sblatnick/geany-plugins/tree/external-tools/external-tools/src>) 
*already allows you to run sql* *with a keyboard shortcut*. You would 
just have to write a simple bash script and it can take whatever is 
currently highlighted or the current document and output the results to 
the bottom panel as text.  Eventually, I'm planning on adding a table to 
the potential output for the plugin.  Using this method would allow you 
to decide if you output to a buffer (copy-able) or to a table, since 
there seems to be differences of opinions on what would be correct behavior.

At the very least, my plugin would be a good starting point for an 
SQL-specific plugin.

Here is my plugin "in action":


Here is the kind of script you could use:

    #!/bin/bash
    echo \"$GEANY_SELECTION\" > /tmp/temp.sql
    mysql -hdatabase -uroot -ppassword < /tmp/temp.sql > /tmp/output.csv
    cat /tmp/output.csv

I hope this helps,

Steve

On 03/25/2014 05:33 PM, Matthew Brush wrote:
> On 14-03-24 01:47 AM, Frank Lanitz 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.
>>
>
> This would be a good project for GeanyPy as it has all kinds of 
> modules to access various types of databases.
>
> One idea for the UI would be to do like Devhelp plugin does to add 
> it's own help webview/notebook around Geany's, and then using 
> gtktreeview or some libgda stuff make a gridview type of thing like is 
> common in db/spreadsheet editors.
>
> Cheers,
> Matthew Brush
>
> _______________________________________________
> 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/20140325/74e93050/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bggcjchb.
Type: image/png
Size: 53706 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20140325/74e93050/attachment-0001.png>


More information about the Devel mailing list