On May 2, 2007, at 2:25 AM, Sanjay wrote:
>
>>> tasklist = func.get_tasklist(engine=engine).execute() # is this
>>> the
>>> correct way?
>>
>> looks fine to me. for the rest of it, im not very familiar with PG
>> stored procedures.
>
> I think SQLAlchemy code is translating to "SELECT get_tasklist()". But
> what is actually needed is "SELECT * FROM get_tasklist()".
>
> So, probably the question is, What SQLAlchemy code will translate to
> "SELECT * FROM get_tasklist()". Needing suggestions.
>
been meaning to document this
s = select(["*"], from_obj=[func.get_tasklist()], engine=engine)
result = s.execute()
alternately, you can name the columns:
s = select([column('col1'), column('col2')], from_obj=
[func.get_tasklist()], engine=engine)
this select has columns like any other table, i.e. s.c.col1,
s.c.col2, etc. which can be used to embed within subqueries.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---