the "func" keyword is used for stored procedures. in the latest trunk, you can also create table-like elements out of funcs to support multi-column stored procedures, and you can create the SQL corresponding to the patterns you describe.
however, these patterns were worked out for Postgres users...MySQL doesnt really support this (i didnt even know it had custom functions at all?). SA is only issuing SQL to the database and cant do anything that you couldnt do at a MySQL command line, for example. On Oct 17, 2006, at 12:12 PM, George Sakkis wrote: > > Is there a way to call a stored procedure from sqlalchemy and access > the returned result set ? If it makes a difference, I'm specifically > interested in MySQL stored procedures. What I want to do is use this > result set as part of another query, but MySQL doesn't currently allow > treating a stored procedure as a (temporary) table, e.g. the following > doesn't work: > > Select y > from (call my_proc(1,2)) > where x>3; > > If I can capture the result set of my_proc with sqlalchemy, I can > express the outer query in python and bypass MySQL's lack of syntactic > support for this. Otherwise I'll probably rewrite my_proc in > sqlalchemy, which may not be that bad after all, but I'd rather avoid > this if possible. > > Thanks, > George > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy -~----------~----~----~----~------~----~------~--~---