Terminology: a column can be part of a primary key.

This commit is contained in:
rosenfield.albert
2008-08-11 21:24:47 +00:00
parent 88fc0316a5
commit c25f3ff8c7
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;