distal-attribute
distal-attribute
distal-attribute
distal-attribute

automatically getting a "frame" of a select-statement

User, date Message
Written by nobswolf
9 months ago
Category: Feature discussion
3 posts since Thu, 01 Aug 13
In the Mysql Workbench I used before Heidi you get a complete default-select-statement with a right click on the table name and choosing "select rows" like

SELECT * FROM dummy.test;

This way you have a "starting point" which saves a lot of typing when you debugging schemas a lot. The phpmyadmin does similar.

Is this feature available in Heidi as well?
Written by ansgar
9 months ago
4793 posts since Fri, 07 Apr 06
In the very right box inside a query tab you see the selected table's "Columns in [table]". Expanding that enables you to select one or more columns, then a rightclick offers "Generate INSERT", "Generate UPDATE" and "Generate DELETE". Unfortunately, "Generate SELECT is missing heresmileThink it's a good idea to add SELECT to that menu.
Written by nobswolf
9 months ago
3 posts since Thu, 01 Aug 13
ah, and I found the snippets there...

It would be nice to have "automagic" replacement-variables to put the "currently active table" there. So I could add to snippets something like:

select $curAllCols
from $curTable
Written by ansgar
9 months ago
4793 posts since Fri, 07 Apr 06
As long as you only refer to this use case I prefer to add that above mentioned "Generate SELECT" menu item. If such a template logic per snippets would be more useful than that I will go and do what you suggest here.
Written by nobswolf
9 months ago
3 posts since Thu, 01 Aug 13
Thats a good question...

I'd say if there are more possible variables, then you could refactor the whole menu-structure there and make most of the entries a "snippet". So you get the details of the SQL out of your code, which is a good thing, IMHO.

But if the example above is the only thing that could be done with variables it might be a bit of overkill to code a parser for such variables.

I am a bit "locked on target" right now to give a good advise. Maybe other users have an opinion on this topic?
Written by ansgar
9 months ago
4793 posts since Fri, 07 Apr 06
Well, a new menu item besides the three other ones should be very simple to add, so that's definitely the first thing I'll do.
Written by ansgar
9 months ago
4793 posts since Fri, 07 Apr 06
Done in r4477
Written by jfalchMoney, Euro
9 months ago
352 posts since Sat, 17 Oct 09
thanks; but i´m a bit confused right now. what do i have to do to see the "Generate SELECT" menu item ?
Written by ansgar
9 months ago
4793 posts since Fri, 07 Apr 06
Rightclick one or more column names, in the very right box of any query tab, after expanding "Column in [selected table]"
Written by Plasm
9 months ago
72 posts since Fri, 10 Sep 10
A bit cosmetic:
Generate SELECT...
INSERT generieren...
UPDATE generieren...
DELETE generieren...

"SELECT generieren..." would fit better.
This issue probably exists only in the german translation(?)
Written by ansgar
9 months ago
4793 posts since Fri, 07 Apr 06
Ah yes... again I forgot to take translations into account. Thanks for the hint.
 

Please login to leave a reply, or register at first.