Re: [SQLObject] j-magic (was: basic RelatedJoin + select question)

2008-03-17 Thread Oleg Broytmann
On Mon, Mar 17, 2008 at 09:07:57PM +, Luke Opperman wrote: > Oleg Broytmann phd.pp.ru> writes: > >Looks good, and 'j' is pretty good "magic" name, IMHO. Will you work on > > a patch? > > r3342 in trunk. New subclass of sqlbuilder.SQLObjectTable named > SQLObjectTableWithJoins that has the

Re: [SQLObject] basic RelatedJoin + select question

2008-03-17 Thread Luke Opperman
Oleg Broytmann phd.pp.ru> writes: >Looks good, and 'j' is pretty good "magic" name, IMHO. Will you work on > a patch? > r3342 in trunk. New subclass of sqlbuilder.SQLObjectTable named SQLObjectTableWithJoins that has the .joinName/.foreignKeyName (and falls back to SQLObjectTable attrs as w

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-17 Thread Oleg Broytmann
On Mon, Mar 17, 2008 at 03:51:47PM +0300, Oleg Broytmann wrote: >BTW, SelectResults (i.e., the result of calling .select()) has > .lazyIter() method that returns an iterator that inside its .next() method > calls cursor.fetchone() instead of .fetchall(). So you can try > > for row in MyTable.s

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-17 Thread Oleg Broytmann
On Mon, Mar 17, 2008 at 12:39:41PM +, Nick Murdoch wrote: > Surely doing that would be no more efficient (aside from going through > SQLObject's interface) than making multiple calls to select() yourself? Sure. > Writing a generator function to do that should be reasonably easy, though.

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-17 Thread Nick Murdoch
Lutz Steinborn wrote: > On Mon, 17 Mar 2008 14:18:31 +0900 > "masayuki.takagi" <[EMAIL PROTECTED]> wrote: > >> hi all, >> >> Does SQLObject have a way to handle a result of select query as stream? >> >> My Application need to work with select queries which return 1GB~ >> result at once. >> >> qu

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-17 Thread Lutz Steinborn
On Mon, 17 Mar 2008 14:18:31 +0900 "masayuki.takagi" <[EMAIL PROTECTED]> wrote: > hi all, > > Does SQLObject have a way to handle a result of select query as stream? > > My Application need to work with select queries which return 1GB~ > result at once. > > queryAll method returns a list whic

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-17 Thread Oleg Broytmann
On Mon, Mar 17, 2008 at 02:33:24PM +0300, Oleg Broytmann wrote: > 1. SQLObject still support Python 2.2; just released 0.10 supports at least > 2.3. Generators were added in Python 2.4. >The next major release that is now the trunk will support Python 2.4. Sorry, I have forgotten the detail

Re: [SQLObject] Does SQLObject have a queryAll-like method which returns the result as generator?

2008-03-17 Thread Oleg Broytmann
On Mon, Mar 17, 2008 at 02:18:31PM +0900, masayuki.takagi wrote: > i think it would be nice if SQLObject has queryAll-like method which > returns the result as generator, not list. > > Does SQLObject have such a interface? It doesn't because of two reasons: 1. SQLObject still support Python