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
|
for j := 0 to FSelectedTableKeys.RecordCount - 1 do begin
|
||||||
if (FSelectedTableKeys.FieldByName('Key_name').AsString = 'PRIMARY')
|
if (FSelectedTableKeys.FieldByName('Key_name').AsString = 'PRIMARY')
|
||||||
and (FSelectedTableKeys.FieldByName('Column_name').AsWideString = ColName) then begin
|
and (FSelectedTableKeys.FieldByName('Column_name').AsWideString = ColName) then begin
|
||||||
FDataGridResult.Columns[i].IsPK := True;
|
FDataGridResult.Columns[i].IsPriPart := True;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
FSelectedTableKeys.Next;
|
FSelectedTableKeys.Next;
|
||||||
@ -5501,7 +5501,7 @@ begin
|
|||||||
else r := FQueryGridResult;
|
else r := FQueryGridResult;
|
||||||
|
|
||||||
// Make primary key columns bold
|
// Make primary key columns bold
|
||||||
if r.Columns[Column].IsPK then
|
if r.Columns[Column].IsPriPart then
|
||||||
TargetCanvas.Font.Style := TargetCanvas.Font.Style + [fsBold];
|
TargetCanvas.Font.Style := TargetCanvas.Font.Style + [fsBold];
|
||||||
|
|
||||||
// Do not apply any color on a selected, highlighted node to keep readability
|
// Do not apply any color on a selected, highlighted node to keep readability
|
||||||
|
@ -50,7 +50,7 @@ type
|
|||||||
Name: WideString;
|
Name: WideString;
|
||||||
DataType: Byte; // @see constants in mysql_structures.pas
|
DataType: Byte; // @see constants in mysql_structures.pas
|
||||||
MaxLength: Cardinal;
|
MaxLength: Cardinal;
|
||||||
IsPK: Boolean;
|
IsPriPart: Boolean;
|
||||||
IsBlob: Boolean;
|
IsBlob: Boolean;
|
||||||
IsText: Boolean;
|
IsText: Boolean;
|
||||||
IsInt: Boolean;
|
IsInt: Boolean;
|
||||||
@ -812,7 +812,7 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
// Primary key field
|
// Primary key field
|
||||||
attribs := '';
|
attribs := '';
|
||||||
if ds.Columns[j].IsPK then
|
if ds.Columns[j].IsPriPart then
|
||||||
attribs := ' class="pk"';
|
attribs := ' class="pk"';
|
||||||
end;
|
end;
|
||||||
Buffer := Buffer + ' <td'+attribs+'>' + data + '</td>' + crlf;
|
Buffer := Buffer + ' <td'+attribs+'>' + data + '</td>' + crlf;
|
||||||
|
Reference in New Issue
Block a user