0

Based on the sqlalchemy it stated that:

Its important to note that when using the SQLAlchemy ORM, these objects are not generally accessed; instead, the Sessionobject is used as the interface to the database.

So i have basic/simple model class, and i have another class with model class inside as attr. As follow:

Class Test (object):
    Model = ModelClass ()

    Def __init__(self):
        Pass

    Def call_proc (self, proc, param):
        # how?
        Pass

Questions: How i call stored procedure from test class using session that i have in my model class?

AnD
  • 3,060
  • 8
  • 35
  • 63
  • Possible duplicate of [stored procedures with sqlAlchemy](https://stackoverflow.com/questions/3563738/stored-procedures-with-sqlalchemy) – Ilja Everilä Aug 22 '17 at 05:22
  • Also https://stackoverflow.com/questions/6713430/call-stored-procedure-from-sqlalchemy has some insights. You could access DB-API level `callproc()` with a raw connection, if you need special handling: http://docs.sqlalchemy.org/en/latest/core/connections.html#calling-stored-procedures. – Ilja Everilä Aug 22 '17 at 05:23

0 Answers0