How do I create a new routine (stored procedure)?
I am using DG 2017.1 on a trial basis to see if it meets my daily needs. How does one create a new stored procedure? In MySQL WorkBench, I simply right click Stored Procedures and click "Create Stored Procedure." Is something like this available in DG? Is there a way to edit existing stored procedures as well? Simply changing some text and clicking save or apply?
Thanks for the help!
请先登录再写评论。
You create them by using the Console, with ctrl+enter auto complete, there is no ui right now.
That isn't really a problem but you also cant really "edit"/"alter" routines as described in
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000167570-How-to-save-changed-routines-properly-
Hope this will be fixed soon (or some JetBrains DEV tells us the secret of saving routines)
Hi,
There is no UI to edit routines like in workbench at the current moment.
To create a new routine:
Follow MySQL documentation https://dev.mysql.com/doc/refman/5.6/en/create-procedure.html
To edit existent routines:
You need to double click or invoke Routine editor (F4) and edit source code of your routine. Since it will be a new code you need to execute it to apply changes. Also, you need to add ALTER instead of CREATE keyword. It's a bit inconvenient but we're working on it https://youtrack.jetbrains.com/issue/DBE-4347
>> secret of saving routines
No secrets. Follow MySQL documentation https://dev.mysql.com/doc/refman/5.6/en/alter-function.html
Thank you.
You can also use GENERATE menu in the editor which is invoked by Alt+Insert Or Cmd+N