Ticket #1434 (closed enhancement: fixed)

Opened 11 months ago

Last modified 7 months ago

[patch] @paginate should handle SQLAlchemy Query objects

Reported by: rejoc Assigned to: roger.demetrescu
Priority: normal Milestone: 1.0.4
Component: SQLAlchemy Version: trunk
Severity: normal Keywords:
Cc:

Description

As SelectResults? is going deprecated, @paginate should also handle Query objects.

Attachments

paginate.py.patch (1.7 kB) - added by rejoc on 07/05/07 13:38:30.
patch proposal
paginate.py.2.patch (0.8 kB) - added by vhata on 08/27/07 10:20:28.
Additional patch

Change History

07/05/07 09:26:54 changed by rejoc

  • type changed from defect to enhancement.
  • summary changed from @paginate should handle SQLAlchemy Query objects to [patch] @paginate should handle SQLAlchemy Query objects.

07/05/07 13:38:30 changed by rejoc

  • attachment paginate.py.patch added.

patch proposal

07/10/07 00:59:33 changed by faide

  • owner changed from anonymous to faide.
  • status changed from new to assigned.

07/10/07 01:00:17 changed by faide

This is in the tube for inclusion before 1.0.3 is out. Thx!

07/13/07 17:48:27 changed by faide

Committed in r3258 (1.0.3dev) and r3259 (1.1dev). And thanks again for the patch :)

07/13/07 17:48:40 changed by faide

  • status changed from assigned to closed.
  • resolution set to fixed.

08/27/07 10:20:28 changed by vhata

  • attachment paginate.py.2.patch added.

Additional patch

08/27/07 10:20:47 changed by vhata

  • status changed from closed to reopened.
  • resolution deleted.

The above patch still doesn't work - it assumes that Query objects have a _query attribute which holds the query object. This is only true for SelectResults? objects.

Patch attached.

09/01/07 12:47:22 changed by paj

  • component changed from TurboGears to SQLAlchemy.

09/01/07 12:50:53 changed by paj

  • version changed from 1.0.2 to trunk.
  • milestone changed from 1.0.3 to 1.0.4.

Seems like a sensible patch. We need to also create unit tests and update the PaginateDecorator? documentation.

09/24/07 10:49:13 changed by roger.demetrescu

I confirm vhata's patch works fine here...

09/25/07 23:09:25 changed by roger.demetrescu

Just for the record, ticket #1582 has the vhata's patch, but with some modification...

Cheers,

Roger

10/10/07 16:41:04 changed by roger.demetrescu

  • owner changed from faide to roger.demetrescu.
  • status changed from reopened to new.

10/19/07 15:16:57 changed by roger.demetrescu

  • status changed from new to closed.
  • resolution set to fixed.

Fixed at [3525] and [3526]. Thanks !