* Fix for mantis bug #8213

git-svn-id: trunk@6193 -
This commit is contained in:
joost 2007-01-25 22:14:27 +00:00
parent 846fbf9fa0
commit 6aa6d4389e

View File

@ -783,17 +783,24 @@ type
TIndexDef = class(TCollectionItem)
Private
FCaseinsFields: string;
FDescFields: string;
FExpression : String;
FFields : String;
FName : String;
FOptions : TIndexOptions;
FSource : String;
protected
procedure SetCaseInsFields(const AValue: string); virtual;
procedure SetDescFields(const AValue: string);
public
constructor Create(Owner: TIndexDefs; const AName, TheFields: string;
TheOptions: TIndexOptions);
destructor Destroy; override;
property Expression: string read FExpression;
property Fields: string read FFields write FFields;
property CaseInsFields: string read FCaseinsFields write SetCaseInsFields;
property DescFields: string read FDescFields write SetDescFields;
property Name: string read FName write FName;
property Options: TIndexOptions read FOptions write FOptions;
property Source: string read FSource write FSource;
@ -1860,6 +1867,20 @@ end;
{ TIndexDef }
procedure TIndexDef.SetDescFields(const AValue: string);
begin
if FDescFields=AValue then exit;
if AValue <> '' then FOptions:=FOptions + [ixDescending];
FDescFields:=AValue;
end;
procedure TIndexDef.SetCaseInsFields(const AValue: string);
begin
if FCaseinsFields=AValue then exit;
if AValue <> '' then FOptions:=FOptions + [ixCaseInsensitive];
FCaseinsFields:=AValue;
end;
constructor TIndexDef.Create(Owner: TIndexDefs; const AName, TheFields: string;
TheOptions: TIndexOptions);