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

View File

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