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

Lex Trotman elextr at xxxxx
Wed Mar 26 00:20:52 UTC 2014

On 26 March 2014 11:03, Steven Blatnick <steve8track at yahoo.com> wrote:

>  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


Of course it would be unlikely that the client id would be a literal in the
code, thats why my suggestion that the user needs to be able to edit the
selection before it is sent to the db.


PS also reminds me of http://xkcd.com/327/ :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20140326/a8b93138/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/20140326/a8b93138/attachment-0001.png>

More information about the Devel mailing list