Implement stored routine editor, see issue #420

Todo: make routines visible in the database tab so they can be edited.
This commit is contained in:
Ansgar Becker
2009-02-28 22:57:55 +00:00
parent 42e969cbcd
commit f20dad8adb
13 changed files with 966 additions and 7 deletions

View File

@ -186,7 +186,7 @@ type
procedure ResetVTNodes(Sender: TBaseVirtualTree);
procedure EnableProgressBar(MaxValue: Integer);
function CompareNumbers(List: TStringList; Index1, Index2: Integer): Integer;
function ListIndexByRegExpr(List: TWideStrings; Expression: WideString): Integer;
var
MYSQL_KEYWORDS : TStringList;
MainReg : TRegistry;
@ -2958,6 +2958,25 @@ begin
end;
function ListIndexByRegExpr(List: TWideStrings; Expression: WideString): Integer;
var
rx: TRegExpr;
i: Integer;
begin
// Find item in stringlist by passing a regular expression
rx := TRegExpr.Create;
rx.Expression := Expression;
rx.ModifierI := True;
Result := -1;
for i := 0 to List.Count - 1 do begin
if rx.Exec(List[i]) then begin
Result := i;
break;
end;
end;
FreeAndNil(rx);
end;
initialization