Query field headings

Andy's profile image Andy posted 4 months ago in Feature discussion Permalink

Hi,

Would it be possible to include - maybe as a toggle you can enable/disable?, the names of the table headings when you run queries. Sometimes the number of fields returned can be large and so keeping track of the tables they came from can be tricky - maybe as an extra row above the headings that shows each table name with a simple alternate shaded background, say light grey, light blue as so as you scroll across the results you can see which table the fields came from.

Regards.

Andy

ansgar's profile image ansgar posted 4 months ago Permalink

Nice idea.

I am just adding a hint to the column headers, so the source table will pop up when you point your mouse it it:

grafik.png

Code modification/commit ee7e7c2 from Ansgar Becker <anse@heidisql.com>, 4 months ago, revision 12.13.0.7148
feat: add "source table: xyz" hint to query result column headers

https://www.heidisql.com/forum.php?t=44554
webdbase's profile image webdbase posted 4 months ago Permalink

Very nice! I appreciate it very much! But when there are column aliases in Cyrillic, there is no table name shown. And it does not appear at all, until before some hint with cell value is shown

1 attachment(s):
webdbase's profile image webdbase posted 4 months ago Permalink

P.S. And it shows only one name - that of the first table, the same one from the tab's name

1 attachment(s):
  • 2025-11-15_17-27-32
ansgar's profile image ansgar posted 4 months ago Permalink

Regarding the wrong table name issue you mention, that works here:

grafik.png

Though it might be that mysql_fetch_field_direct returns the wrong table name, not sure.

The issue of not displaying a hint until a cell shows a hint seems to be a long-time issue in VirtualTree: https://github.com/JAM-Software/Virtual-TreeView/issues/728

webdbase's profile image webdbase posted 4 months ago Permalink

Sorry, it's not the same here. The server is MariaDB. It fails even with simple queries..

1 attachment(s):
ansgar's profile image ansgar posted 4 months ago Permalink

No problem. I just retested on MariaDB 11.1, and I realize that calculated or aggregated columns (like SUM(...) or FORMAT(...)) do not reveal their source table to the C API in mysql_fetch_field_direct . But non-aggregated fields are displaying their correct source table, even if the column name has cyrillic chars:

grafik.png

FFS's profile image FFS posted 1 month ago Permalink

Dear Ansgar,

I, too, appreciate that new feature very much, and I was pleasently surprised to see how fast you were to pick up that proposal! Thanks a lot for your steady work even on tiny details

Thomas

ansgar's profile image ansgar posted 1 month ago Permalink

Hey Thomas, thanks for your appreciation!

I was just testing if the rewritten Lazarus codebase has the same thing, and I see the VirtualTree issue does not exist - the tooltip shows quickly and without the need to click somewhere in the tree before.

1 attachment(s):
  • header-tooltips-cyrillic

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