to my knowledge, the existing DBAPIs for MySQL don't support output parameters (news to me that MySQL SPs did). But I haven't confirmed that. You'd need to figure out first how to do this with the plain DBAPI cursor, such as that of MySQL-python. Within SQLAlchemy for now you'd probably need to use the DBAPI connection directly from an Engine or a Connection and then manipulate the cursor directly.
On Apr 18, 2013, at 9:18 AM, Stephen Ray <stephenr092...@gmail.com> wrote: > My environment is Python 3.2, SQLAlchemy 0.8, MySQL 5.5, and using > MySQL-connector 1.0.9. > > I have a stored procedure that takes two input parameters (both integers) and > returns a single integer output parameter indicating the success of failure > of the stored procedure. No record sets are returned by the stored procedure, > its essentially part of an ETL process that loads from staging tables. All I > need to know is the return status contained in the single output parameter to > know whether the load was successful or not. > > I've trawled the web for good examples and seen solutions using func objects, > text objects, and calling a constructed string directly. Which would be the > best approach to use in this situation? I would like something as DB agnostic > as possible so I tried the func approach first but this seemed to be treating > the SQL object as a MySQL Function rather than a MySQL Stored Procedure. > > Thanks in advance. > > Stephen Ray > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.