Hello.
I have found this recipe:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/WindowedRangeQuery
I think it fits perfectly for my usecase: process potentially large result set
of ORM instances in chunks of predefined size to limit memory consumption.
I have few questions / remarks:
* I
No, the comma is supposed to be there; it's for tuple unpacking. The
iterable q yields tuples (which in this case are of length one, because the
resultset has only one column).
The column should be whatever attribute of the ORM instances you want to
sort by, not necessarily the primary key.
The
Hello.
I think I understand it all now.
Thank you,
Ladislav Lenart
On 26.4.2013 13:22, Gunnlaugur Thor Briem wrote:
No, the comma is supposed to be there; it's for tuple unpacking. The iterable
q
yields tuples (which in this case are of length one, because the resultset has
only one