On Fri, 25 Jan 2008, Oleg Broytmann wrote:
> On Thu, Jan 24, 2008 at 07:17:55PM +1100, Richard Jones wrote:
> > Feeding the sqlbuilder.Select directly to the
> > SQLObject.select() doesn't work, obviously :)
>
>    After you have created an instance of the Select class you need to
> render it to an SQL query, run the query and get the results.

Hmm, so I could just use the SQL statement string I've already written?


> Rendering is 
> done by connection's method .sqlrepr(), querying by methods .query(),
> .queryAll():
>
> for row in connection.queryAll(
>    connection.sqlrepr(
>       sqlbuilder.Select(...)
>    )
> ):
>    print row # every row is a tuple of columns in the order you have passed
>              # to Select()

Thanks for your explanation, now how do I get a connection? :)

I'm using TurboGears (for the first time). I guess I need to sign up to a TG 
mailing list now...


     Richard

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to