mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Terminology: a column can be part of a primary key.
This commit is contained in:
@ -1307,7 +1307,7 @@ begin
|
||||
for j := 0 to FSelectedTableKeys.RecordCount - 1 do begin
|
||||
if (FSelectedTableKeys.FieldByName('Key_name').AsString = 'PRIMARY')
|
||||
and (FSelectedTableKeys.FieldByName('Column_name').AsWideString = ColName) then begin
|
||||
FDataGridResult.Columns[i].IsPK := True;
|
||||
FDataGridResult.Columns[i].IsPriPart := True;
|
||||
break;
|
||||
end;
|
||||
FSelectedTableKeys.Next;
|
||||
@ -5501,7 +5501,7 @@ begin
|
||||
else r := FQueryGridResult;
|
||||
|
||||
// Make primary key columns bold
|
||||
if r.Columns[Column].IsPK then
|
||||
if r.Columns[Column].IsPriPart then
|
||||
TargetCanvas.Font.Style := TargetCanvas.Font.Style + [fsBold];
|
||||
|
||||
// Do not apply any color on a selected, highlighted node to keep readability
|
||||
|
@ -50,7 +50,7 @@ type
|
||||
Name: WideString;
|
||||
DataType: Byte; // @see constants in mysql_structures.pas
|
||||
MaxLength: Cardinal;
|
||||
IsPK: Boolean;
|
||||
IsPriPart: Boolean;
|
||||
IsBlob: Boolean;
|
||||
IsText: Boolean;
|
||||
IsInt: Boolean;
|
||||
@ -812,7 +812,7 @@ begin
|
||||
else begin
|
||||
// Primary key field
|
||||
attribs := '';
|
||||
if ds.Columns[j].IsPK then
|
||||
if ds.Columns[j].IsPriPart then
|
||||
attribs := ' class="pk"';
|
||||
end;
|
||||
Buffer := Buffer + ' <td'+attribs+'>' + data + '</td>' + crlf;
|
||||
|
Reference in New Issue
Block a user