Hi Christoph,

Thanks for looking into the pagination stuff.

On Jan 29, 11:54 pm, Christoph Haas <[EMAIL PROTECTED]> wrote:

> The documentation 
> athttp://pylonshq.com/WebHelpers/module-webhelpers.pagination.htmlcontains
> this example:
>
>   # In this case, Person is a SQLObject class, or it could be a list/tuple
>   person_paginator, person_set = paginate(Person, page=1)
>
> It wasn't very clear to me how that is supposed to work with SQLAlchemy. It
> must look like this:
>
>   person_paginator, person_set = \
>     h.pagination.paginate(model.Person.select())
>
> Can we please add that example to the the webhelpers/pagination/orm.py
> module?
>

But this is exactly what the paginator is supposed to avoid when using
an ORM. You're selecting every person from the database, pulling it
into memory, and making the paginator chunk it up. The point of giving
it a real query object is that it should use limit and offset to
select only the elements from the DB to make the current page, not
carry it all around in memory.

I started a ticket for using the paginator with assign_mapper (in
broken English) about a month ago. See #167.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to