Query object has a __iter__ descriptor.
2013/4/26 Mauricio de Abreu Antunes <mauricio.abr...@gmail.com> > Read the source: > > def all(self): > """Return the results represented by this ``Query`` as a list. > > This results in an execution of the underlying query. > > """ > return list(self) > > it means that this method collects everything it needs and it is yielded > by the generator. > If you returns the query for a variable, you can perform a next(variable). > > > 2013/4/26 alonn <alonis...@gmail.com> > >> so not to load too much into memory I should do something like: >> >> for i in session.query(someobject).filter(id>something) >> print i >> >> I'm guessing the answer is no, because of the nature of sql, but I'm not >> an expert so I'm asking. >> >> Thanks for the help! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sqlalchemy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sqlalchemy+unsubscr...@googlegroups.com. >> To post to this group, send email to sqlalchemy@googlegroups.com. >> Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > *Mauricio de Abreu Antunes* > Mobile: (51)930-74-525 > Skype: mauricio.abreua > -- *Mauricio de Abreu Antunes* Mobile: (51)930-74-525 Skype: mauricio.abreua -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.