mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Separate Create > "Stored routine" menu item into two, one for procedures and one for functions. Closes #987
This commit is contained in:
@ -7,7 +7,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: HeidiSQL\n"
|
"Project-Id-Version: HeidiSQL\n"
|
||||||
"POT-Creation-Date: 2012-11-05 21:40\n"
|
"POT-Creation-Date: 2012-11-05 21:40\n"
|
||||||
"PO-Revision-Date: 2021-01-16 16:20+0100\n"
|
"PO-Revision-Date: 2021-01-17 14:36+0100\n"
|
||||||
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
|
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
|
||||||
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n"
|
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -2212,15 +2212,17 @@ msgstr "Select all"
|
|||||||
msgid "Select all|Select all items or text"
|
msgid "Select all|Select all items or text"
|
||||||
msgstr "Select all|Select all items or text"
|
msgstr "Select all|Select all items or text"
|
||||||
|
|
||||||
#. MainForm..ActionList1..actCreateRoutine..Caption
|
msgid "Stored procedure"
|
||||||
#: main.dfm:2401
|
msgstr "Stored procedure"
|
||||||
msgid "Stored routine"
|
|
||||||
msgstr "Stored routine"
|
|
||||||
|
|
||||||
#. MainForm..ActionList1..actCreateRoutine..Hint
|
msgid "Create stored procedure"
|
||||||
#: main.dfm:2402
|
msgstr "Create stored procedure"
|
||||||
msgid "Create stored routine|Create stored procedure or function"
|
|
||||||
msgstr "Create stored routine|Create stored procedure or function"
|
msgid "Stored function"
|
||||||
|
msgstr "Stored function"
|
||||||
|
|
||||||
|
msgid "Create stored function"
|
||||||
|
msgstr "Create stored function"
|
||||||
|
|
||||||
#. MainForm..ActionList1..actNewQueryTab..Caption
|
#. MainForm..ActionList1..actNewQueryTab..Caption
|
||||||
#: main.dfm:2408
|
#: main.dfm:2408
|
||||||
|
@ -2965,10 +2965,10 @@ object MainForm: TMainForm
|
|||||||
OnExecute = actSelectAllExecute
|
OnExecute = actSelectAllExecute
|
||||||
OnUpdate = ValidateControls
|
OnUpdate = ValidateControls
|
||||||
end
|
end
|
||||||
object actCreateRoutine: TAction
|
object actCreateProcedure: TAction
|
||||||
Category = 'Database'
|
Category = 'Database'
|
||||||
Caption = 'Stored routine'
|
Caption = 'Stored procedure'
|
||||||
Hint = 'Create stored routine|Create stored procedure or function'
|
Hint = 'Create stored procedure'
|
||||||
ImageIndex = 119
|
ImageIndex = 119
|
||||||
ImageName = 'icons8-source-code-other'
|
ImageName = 'icons8-source-code-other'
|
||||||
OnExecute = actCreateDBObjectExecute
|
OnExecute = actCreateDBObjectExecute
|
||||||
@ -3021,6 +3021,13 @@ object MainForm: TMainForm
|
|||||||
ImageName = 'icons8-sheets-100'
|
ImageName = 'icons8-sheets-100'
|
||||||
OnExecute = actTableToolsExecute
|
OnExecute = actTableToolsExecute
|
||||||
end
|
end
|
||||||
|
object actCreateFunction: TAction
|
||||||
|
Category = 'Database'
|
||||||
|
Caption = 'Stored function'
|
||||||
|
Hint = 'Create stored function'
|
||||||
|
ImageIndex = 35
|
||||||
|
OnExecute = actCreateDBObjectExecute
|
||||||
|
end
|
||||||
object actCreateTrigger: TAction
|
object actCreateTrigger: TAction
|
||||||
Category = 'Database'
|
Category = 'Database'
|
||||||
Caption = 'Trigger'
|
Caption = 'Trigger'
|
||||||
@ -3566,7 +3573,10 @@ object MainForm: TMainForm
|
|||||||
Action = actCreateView
|
Action = actCreateView
|
||||||
end
|
end
|
||||||
object menuCreateRoutine: TMenuItem
|
object menuCreateRoutine: TMenuItem
|
||||||
Action = actCreateRoutine
|
Action = actCreateProcedure
|
||||||
|
end
|
||||||
|
object Storedfunction1: TMenuItem
|
||||||
|
Action = actCreateFunction
|
||||||
end
|
end
|
||||||
object menuCreateTrigger: TMenuItem
|
object menuCreateTrigger: TMenuItem
|
||||||
Action = actCreateTrigger
|
Action = actCreateTrigger
|
||||||
|
@ -456,7 +456,7 @@ type
|
|||||||
N26: TMenuItem;
|
N26: TMenuItem;
|
||||||
actSessionManager: TAction;
|
actSessionManager: TAction;
|
||||||
Sessionmanager1: TMenuItem;
|
Sessionmanager1: TMenuItem;
|
||||||
actCreateRoutine: TAction;
|
actCreateProcedure: TAction;
|
||||||
btnExit: TToolButton;
|
btnExit: TToolButton;
|
||||||
lblSorryNoData: TLabel;
|
lblSorryNoData: TLabel;
|
||||||
menuPrint: TMenuItem;
|
menuPrint: TMenuItem;
|
||||||
@ -749,6 +749,8 @@ type
|
|||||||
actNewQueryTabNofocus: TAction;
|
actNewQueryTabNofocus: TAction;
|
||||||
DataGUIDlowercase: TMenuItem;
|
DataGUIDlowercase: TMenuItem;
|
||||||
DataGUIDlowercaseWobraces: TMenuItem;
|
DataGUIDlowercaseWobraces: TMenuItem;
|
||||||
|
actCreateFunction: TAction;
|
||||||
|
Storedfunction1: TMenuItem;
|
||||||
procedure actCreateDBObjectExecute(Sender: TObject);
|
procedure actCreateDBObjectExecute(Sender: TObject);
|
||||||
procedure menuConnectionsPopup(Sender: TObject);
|
procedure menuConnectionsPopup(Sender: TObject);
|
||||||
procedure actExitApplicationExecute(Sender: TObject);
|
procedure actExitApplicationExecute(Sender: TObject);
|
||||||
@ -4361,9 +4363,11 @@ begin
|
|||||||
Obj.Database := ActiveDatabase;
|
Obj.Database := ActiveDatabase;
|
||||||
if a = actCreateTable then Obj.NodeType := lntTable
|
if a = actCreateTable then Obj.NodeType := lntTable
|
||||||
else if a = actCreateView then Obj.NodeType := lntView
|
else if a = actCreateView then Obj.NodeType := lntView
|
||||||
else if a = actCreateRoutine then Obj.NodeType := lntProcedure
|
else if a = actCreateProcedure then Obj.NodeType := lntProcedure
|
||||||
else if a = actCreateTrigger then Obj.NodeType := lntTrigger
|
else if a = actCreateTrigger then Obj.NodeType := lntTrigger
|
||||||
else if a = actCreateEvent then Obj.NodeType := lntEvent;
|
else if a = actCreateEvent then Obj.NodeType := lntEvent
|
||||||
|
else if a = actCreateFunction then Obj.NodeType := lntFunction;
|
||||||
|
|
||||||
PlaceObjectEditor(Obj);
|
PlaceObjectEditor(Obj);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -7291,7 +7295,8 @@ begin
|
|||||||
actAttachDatabase.Enabled := actAttachDatabase.Visible and (Obj.NodeType = lntNone);
|
actAttachDatabase.Enabled := actAttachDatabase.Visible and (Obj.NodeType = lntNone);
|
||||||
actCreateTable.Enabled := IsDb or IsObject or (Obj.GroupType = lntTable);
|
actCreateTable.Enabled := IsDb or IsObject or (Obj.GroupType = lntTable);
|
||||||
actCreateView.Enabled := IsDb or IsObject or (Obj.GroupType = lntView);
|
actCreateView.Enabled := IsDb or IsObject or (Obj.GroupType = lntView);
|
||||||
actCreateRoutine.Enabled := IsDb or IsObject or (Obj.GroupType in [lntFunction, lntProcedure]);
|
actCreateProcedure.Enabled := IsDb or IsObject or (Obj.GroupType in [lntFunction, lntProcedure]);
|
||||||
|
actCreateFunction.Enabled := actCreateProcedure.Enabled;
|
||||||
actCreateTrigger.Enabled := IsDb or IsObject or (Obj.GroupType = lntTrigger);
|
actCreateTrigger.Enabled := IsDb or IsObject or (Obj.GroupType = lntTrigger);
|
||||||
actCreateEvent.Enabled := IsDb or IsObject or (Obj.GroupType = lntEvent);
|
actCreateEvent.Enabled := IsDb or IsObject or (Obj.GroupType = lntEvent);
|
||||||
actDropObjects.Enabled := IsObject or
|
actDropObjects.Enabled := IsObject or
|
||||||
@ -7314,7 +7319,8 @@ begin
|
|||||||
actAttachDatabase.Visible := False;
|
actAttachDatabase.Visible := False;
|
||||||
actCreateTable.Enabled := True;
|
actCreateTable.Enabled := True;
|
||||||
actCreateView.Enabled := True;
|
actCreateView.Enabled := True;
|
||||||
actCreateRoutine.Enabled := True;
|
actCreateProcedure.Enabled := True;
|
||||||
|
actCreateFunction.Enabled := True;
|
||||||
actCreateTrigger.Enabled := True;
|
actCreateTrigger.Enabled := True;
|
||||||
actCreateEvent.Enabled := True;
|
actCreateEvent.Enabled := True;
|
||||||
actDropObjects.Enabled := ListTables.SelectedCount > 0;
|
actDropObjects.Enabled := ListTables.SelectedCount > 0;
|
||||||
@ -7335,7 +7341,8 @@ begin
|
|||||||
if (ActiveConnection <> nil) and (ActiveConnection.Parameters.IsAnyMySQL) then begin
|
if (ActiveConnection <> nil) and (ActiveConnection.Parameters.IsAnyMySQL) then begin
|
||||||
Version := ActiveConnection.ServerVersionInt;
|
Version := ActiveConnection.ServerVersionInt;
|
||||||
actCreateView.Enabled := actCreateView.Enabled and (Version >= 50001);
|
actCreateView.Enabled := actCreateView.Enabled and (Version >= 50001);
|
||||||
actCreateRoutine.Enabled := actCreateRoutine.Enabled and (Version >= 50003);
|
actCreateProcedure.Enabled := actCreateProcedure.Enabled and (Version >= 50003);
|
||||||
|
actCreateFunction.Enabled := actCreateFunction.Enabled and (Version >= 50003);
|
||||||
actCreateTrigger.Enabled := actCreateTrigger.Enabled and (Version >= 50002);
|
actCreateTrigger.Enabled := actCreateTrigger.Enabled and (Version >= 50002);
|
||||||
actCreateEvent.Enabled := actCreateEvent.Enabled and (Version >= 50100);
|
actCreateEvent.Enabled := actCreateEvent.Enabled and (Version >= 50100);
|
||||||
end;
|
end;
|
||||||
|
@ -147,16 +147,16 @@ begin
|
|||||||
comboDataAccess.ItemIndex := 0;
|
comboDataAccess.ItemIndex := 0;
|
||||||
comboSecurity.ItemIndex := 0;
|
comboSecurity.ItemIndex := 0;
|
||||||
editComment.Clear;
|
editComment.Clear;
|
||||||
|
case Obj.NodeType of
|
||||||
|
lntProcedure: comboType.ItemIndex := 0;
|
||||||
|
lntFunction: comboType.ItemIndex := 1;
|
||||||
|
end;
|
||||||
comboDefiner.Text := '';
|
comboDefiner.Text := '';
|
||||||
comboDefiner.TextHint := f_('Current user (%s)', [Obj.Connection.CurrentUserHostCombination]);
|
comboDefiner.TextHint := f_('Current user (%s)', [Obj.Connection.CurrentUserHostCombination]);
|
||||||
comboDefiner.Hint := f_('Leave empty for current user (%s)', [Obj.Connection.CurrentUserHostCombination]);
|
comboDefiner.Hint := f_('Leave empty for current user (%s)', [Obj.Connection.CurrentUserHostCombination]);
|
||||||
SynMemoBody.Text := 'BEGIN'+CRLF+CRLF+'END';
|
SynMemoBody.Text := 'BEGIN'+CRLF+CRLF+'END';
|
||||||
if DBObject.Name <> '' then begin
|
if DBObject.Name <> '' then begin
|
||||||
// Editing existing routine
|
// Editing existing routine
|
||||||
case Obj.NodeType of
|
|
||||||
lntProcedure: comboType.ItemIndex := 0;
|
|
||||||
lntFunction: comboType.ItemIndex := 1;
|
|
||||||
end;
|
|
||||||
DBObject.Connection.ParseRoutineStructure(Obj, Parameters);
|
DBObject.Connection.ParseRoutineStructure(Obj, Parameters);
|
||||||
comboReturns.Text := Obj.Returns;
|
comboReturns.Text := Obj.Returns;
|
||||||
chkDeterministic.Checked := Obj.Deterministic;
|
chkDeterministic.Checked := Obj.Deterministic;
|
||||||
|
Reference in New Issue
Block a user