I like to use a stored procure which needs a input parameter in something like this:

seltest = db.sa.select(["id", "name"]).select_from(db.sa.func.someStoredProc(2)).alias()
seltestm = db.sao.mapper(ATest, seltest, primary_key=[seltest.c.id])
result = session.query(seltestm).get(73)

above works, but I would really need to replace the hardcoded "2" with a function, i.e.:

seltest = db.sa.select(["id", "name"]).select_from(db.sa.func.someStoredProc(getSomeUserValue())).alias()
seltestm = db.sao.mapper(ATest, seltest, primary_key=[seltest.c.id])

# set the SomeUserValue here and then do
result = session.query(seltestm).get(73)

tried using functools.partial but I get a InterfaceError exception.

Werner

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to