Idea: "Go to" context menu command.

archfrog's profile image archfrog posted 8 years ago in Feature discussion Permalink

Just a tiny idea, which may or may not be interesting to others:

Add a "Go to" context menu to the Table/Data view so that you can go to a foreign key's definition. For instance, I have a table of staff members (named staff), which has a foreign key called "contact" from the table "contacts". When I view the staff table, it would be neat if I could select "Go to" in the "contact" field (which "points to" contacts.contact) so that the following SQL query was made and I was moved to the result of it:

SELECT * from contacts where contact = `the value that I choose to go to`;

The idea being that you then can quickly and conveniently verify what's at the "end of the" foreign key reference. This is something that my web UI will implement eventually, but during development it could be handy as you often have to manually build tables or seed (fill them in) them using Laravel's seed feature.

If this is unclear or just pretty stupid, please free to ignore my post :-)

Cheers, Archfrog

[expired user #5213]'s profile image [expired user #5213] posted 8 years ago Permalink

PhpPgAdmin actually has this feature to "follow" a foreign key, and it's really handy.

When you click on a foreign key there, you can open a new window, with the parent record selected.

HeidiSQL has the important building blocks for this ready: It already detects it when a foreign key is selected, and it can already query the parent table (the first text column is shown in the dropdown, and the id is used internally)

The simplest solution would be to do something like this:

  1. When the user double-clicks a foreign key (id 343893):
  2. Open the table grid for the parent table, with filter 'id=343893' (or whatever the name of the FK field is)

That's it. Quick way to see the parent data. If there is another foreign key in that table, you can quickly jump around in the database.

I now often do this manually, by remembering the id, finding the parent table, and then find the record with the right id. Being able to doubleclick would be pretty awesome.

[expired user #10623]'s profile image [expired user #10623] posted 8 years ago Permalink

Yes! Please make this a feature! I just started using HeidiSQL and love it but this really bugs me to always search for the referenced record.

Same request with this old post: "forum.php?t=20427" (Can't post links to even to your own website -.-)

(I've posted this in both to 'link' them)

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