mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
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:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user