mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
feat: add "source table: xyz" hint to query result column headers
https://www.heidisql.com/forum.php?t=44554
This commit is contained in:
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: HeidiSQL\n"
|
||||
"POT-Creation-Date: 2012-11-05 21:40\n"
|
||||
"PO-Revision-Date: 2025-10-13 20:32+0200\n"
|
||||
"PO-Revision-Date: 2025-11-06 19:16+0100\n"
|
||||
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
|
||||
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n"
|
||||
"Language: en\n"
|
||||
@@ -15,7 +15,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 3.7\n"
|
||||
"X-Generator: Poedit 3.8\n"
|
||||
|
||||
#. AboutBox..Caption
|
||||
#: about.dfm:5
|
||||
@@ -6764,3 +6764,6 @@ msgstr "Selects the first %s rows in a new query tab"
|
||||
|
||||
msgid "Open file after creation"
|
||||
msgstr "Open file after creation"
|
||||
|
||||
msgid "Source table"
|
||||
msgstr "Source table"
|
||||
|
||||
@@ -396,6 +396,7 @@ type
|
||||
function GetImageLinkTimeStamp(const FileName: string): TDateTime;
|
||||
function IsEmpty(Str: String): Boolean;
|
||||
function IsNotEmpty(Str: String): Boolean;
|
||||
function IfEmpty(Str: String; WhenEmpty: String): String;
|
||||
function MessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer; overload;
|
||||
function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; KeepAskingSetting: TAppSettingIndex=asUnused; FooterText: String=''): Integer; overload;
|
||||
function ErrorDialog(Msg: string): Integer; overload;
|
||||
@@ -2420,6 +2421,13 @@ begin
|
||||
Result := Str <> '';
|
||||
end;
|
||||
|
||||
function IfEmpty(Str: String; WhenEmpty: String): String;
|
||||
begin
|
||||
if Str.IsEmpty then
|
||||
Result := WhenEmpty
|
||||
else
|
||||
Result := Str;
|
||||
end;
|
||||
|
||||
function MessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer;
|
||||
begin
|
||||
|
||||
@@ -3405,6 +3405,7 @@ begin
|
||||
for i:=0 to NewTab.Results.ColumnCount-1 do begin
|
||||
col := NewTab.Grid.Header.Columns.Add;
|
||||
col.Text := NewTab.Results.ColumnNames[i];
|
||||
col.Hint := _('Source table') + ': ' + IfEmpty(NewTab.Results.TableName(i), '-');
|
||||
if NewTab.Results.DataType(i).Category in [dtcInteger, dtcReal] then
|
||||
col.Alignment := taRightJustify;
|
||||
if NewTab.Results.ColIsPrimaryKeyPart(i) then
|
||||
|
||||
Reference in New Issue
Block a user