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

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

java - How to pass parameters between Request-Scoped Controllers? -