Support comments on table indexes via table designer. Closes #128

This commit is contained in:
Ansgar Becker
2022-07-18 17:02:36 +02:00
parent 99ed1f16f2
commit c7dc63706d
3 changed files with 11 additions and 1 deletions

View File

@@ -10589,6 +10589,9 @@ begin
if Algorithm <> '' then
Result := Result + ' USING ' + Algorithm;
if not Comment.IsEmpty then
Result := Result + ' COMMENT ' + FConnection.EscapeString(Comment);
end;
procedure TTableKeyList.Assign(Source: TTableKeyList);

View File

@@ -280,7 +280,7 @@ object frmTableEditor: TfrmTableEditor
Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
Position = 0
Text = 'Name'
Width = 434
Width = 214
end
item
Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
@@ -292,6 +292,11 @@ object frmTableEditor: TfrmTableEditor
Position = 2
Text = 'Algorithm'
Width = 80
end
item
Position = 3
Text = 'Comment'
Width = 120
end>
end
object tlbIndexes: TToolBar

View File

@@ -1797,6 +1797,7 @@ begin
CellText := TblKey.Name;
1: CellText := TblKey.IndexType;
2: CellText := TblKey.Algorithm;
3: CellText := TblKey.Comment;
end;
end;
1: begin
@@ -2100,6 +2101,7 @@ begin
TblKey.Name := TTableKey.PRIMARY;
end;
2: TblKey.Algorithm := NewText;
3: TblKey.Comment := NewText;
end;
// Needs to be called manually for Name and IndexType properties:
TblKey.Modification(Sender);