hi!

On Thu, Jun 30, 2011 at 06:32:27PM -0500, Chris Bennett wrote:
> Say i have a function on my MySQL database that returns a new table.
> so i access sqlbuilder.func.myfunc() by:
> query = myconn.sqlrepr(sqlbuilder.Select(sqlbuilder.func.myfunc()))
> results = myconn.queryAll(query)
> and results is a tuple of tuples 
> Is
>  there a way to have that table be returned as a SelectResults class so
>  i can access its attrs and everything?

   There is no currently. In TODO http://sqlobject.org/TODO.html there
is an item

Expression columns - in SELECT but not in INSERT/UPDATE. Something like this:

class MyClass(SQLObject):
    function1 = ExpressionCol(func.my_function(MyClass.q.col1))
    function2 = ExpressionCol('sum(col2)')

But we don't have any code yet.

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to