MySQL Forums
Forum List  »  MySQL Workbench

Create Stored Procedure using Python plugin in MySQL Workbench
Posted by: Pedro Márquez
Date: November 22, 2012 04:18PM

Good afternoon,

I'm working on creating open source plugins for MySQL Workbench.

I'm making some tests using the available classes for Python. I've found very usefull tutorials about creating columns and keys in tables.

But what I can't really found is how to create stored procedures using the default classes.

Could you help me to know how to do this?


Thanks.


EDIT:

I asked about this in the IRC and they provide me an answer:

routine = schema.addNewRoutine("db.mysql")
routine.name = 'myroutine'
routine.sqlDefinition = sp_sql_code

And this will add the SP defined in sp_sql_code to the model.

Options: ReplyQuote


Subject
Views
Written By
Posted
Create Stored Procedure using Python plugin in MySQL Workbench
1766
November 22, 2012 04:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.