python - Call stored procedure from SQLAlchemy -
python - Call stored procedure from SQLAlchemy -
in sqlalchemy
, preferred way phone call stored database procedure? (including set arguments , receive exit status , outputted variables)
i've seen examples utilize execute()
execute raw database string, contain vendor specific syntax, right?
yes can utilize execute , can indeed contain vendor specific syntax.
you should consider using outparam
.
from sqlalchemy docs :
sqlalchemy.sql.expression.outparam(key, type_=none)
create ‘out’ parameter usage in functions (stored procedures), databases back upwards them.
the outparam can used regular function parameter. “output” value available resultproxy object via out_parameters attribute, returns dictionary containing values.
here examples of using outparam: http://nullege.com/codes/search/sqlalchemy.sql.outparam
python sqlalchemy
Comments
Post a Comment