I'm trying to call a stored procedure that returns multiple result sets using SQLAlchemy. If it matters, underneath I'm using PyODBC and FreeTDS. I call the execute() method using a raw query with "exec" calling my stored procedure on a session object and get a ResultProxy object back.
With a raw pyodbc cursor, I can call the nextset() function to advance to the next result set. I see no way to do the same using the ResultProxy I get back from SQLAlchemy. Indeed, the docs say:
The DBAPI cursor will be closed by the ResultProxy when all of its result rows (if any) are exhausted.
Is there a way to read multiple result sets with SQLAlchemy, or will I have to perform this query with the raw DBAPI?