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 <[email protected]>
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.