Re: Pagers and Iterators

[prev] [thread] [next] [Date index for 2005/02/25]

From: William Ross
Subject: Re: Pagers and Iterators
Date: 12:15 on 25 Feb 2005
On 25 Feb 2005, at 11:47, Simon Wistow wrote:

> On Fri, Feb 25, 2005 at 12:34:22PM +0100, Daniel Wijnands said:
>> Let the database order, that's what is should be good in
>
> Sorry, my bad. I should have specified that 'foo' was no a database
> column but a method
>
> 	sub foo {
> 		my $self = shift;
> 		some_munging($self->actual_column);
> 	}

if you want to use one of the various standard ways of displaying a 
list - which I do, in order to use the same pagination mechanisms for 
all possible lists - then you will probably want foo() to return an 
iterator.

The iterator can be built around a list of either objects or ids, but 
at the moment any objects it contains will be refetched when next() is 
called: one way around this would be to make sure that the objects are 
in the %live_object stash before the iterator is created.

?

will



>
>
> i.e the operation done in some_munging() cannot be done in SQL
>
>

(message missing)

Pagers and Iterators
Simon Wistow 11:30 on 25 Feb 2005

Re: Pagers and Iterators
Daniel Wijnands 11:34 on 25 Feb 2005

Re: Pagers and Iterators
Simon Wistow 11:47 on 25 Feb 2005

Re: Pagers and Iterators
Sean Davis 11:55 on 25 Feb 2005

Re: Pagers and Iterators
Simon Wistow 12:14 on 25 Feb 2005

Re: Pagers and Iterators
Carl Johnstone 13:23 on 25 Feb 2005

Re: Pagers and Iterators
Cees Hek 14:18 on 25 Feb 2005

Re: Pagers and Iterators
Matt S Trout 14:35 on 25 Feb 2005

Re: Pagers and Iterators
William Ross 12:15 on 25 Feb 2005

Re: Pagers and Iterators
William Ross 14:04 on 25 Feb 2005

Re: Pagers and Iterators
Simon Wistow 15:37 on 25 Feb 2005

Re: Pagers and Iterators
Simon Wistow 16:34 on 25 Feb 2005

Re: Pagers and Iterators
Ofer Nave 20:52 on 25 Feb 2005

Re: Pagers and Iterators
Cees Hek 16:41 on 25 Feb 2005

Re: Pagers and Iterators
Carl Johnstone 17:09 on 25 Feb 2005

Generated at 17:56 on 01 Mar 2005 by mariachi v0.52