dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
39.02k stars 3.37k forks source link

Allow creation of macros #5291

Open d2a-raudenaerde opened 5 years ago

d2a-raudenaerde commented 5 years ago

PGAdmin has support for macros in SQL execution. For example, when selecting a table name, it allows SELECT * FROM LIMIT 1000, which improves the usability for power users.

See here: https://www.pgadmin.org/docs/pgadmin3/1.22/macros.html

It would be very nice if we could customize something similar for DBeaver.

nmat commented 5 years ago

You mean something like Templates but with Keybinding support right?

https://github.com/dbeaver/dbeaver/wiki/SQL-Templates

But to be able to push Ctrl+Shift+Something to just run the query?

d2a-raudenaerde commented 5 years ago

Yes! And then be able to allow multiple key-bindings; for example Alt-F1 to Alt-F12 or customizable like the other keybindings.

d2a-raudenaerde commented 5 years ago

I tried looking into the source to maybe try to write up a patch, but maybe anyone can give me some pointers? The hotkeys seem to be defined in the .xml files and I would like them to be configurable somehow.

haubourg commented 5 years ago

+1 just like pgadmin macros, I use three of them all the time:

Really a time saver with key bindings

leandromarrom commented 5 years ago

Isso é muito bom e muito útil.