RE: retrieve_all method to support order_by

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

From: Zhuang Li
Subject: RE: retrieve_all method to support order_by
Date: 20:10 on 23 Feb 2005
Is there any reason why retrieve_all method doesn't support 'ORDER BY'
clause? Will it be in future release?

I have patched our system with:

__PACKAGE__->set_sql(RetrieveAll =3D> <<'');
SELECT __ESSENTIAL__
FROM   __TABLE__
%s

sub retrieve_all {
    my ($class, $arg) =3D @_;

    if (ref $arg eq "HASH" && $arg->{order_by}) {
        return $class->sth_to_objects($class->sql_RetrieveAll(" ORDER BY
$arg->{order_by}"));
    } else {
        return $class->sth_to_objects('RetrieveAll');
    }
}




john

(message missing)

RE: retrieve_all method to support order_by
Zhuang Li 20:10 on 23 Feb 2005

Re: retrieve_all method to support order_by
Jonathan Tweed 20:15 on 23 Feb 2005

RE: retrieve_all method to support order_by
Zhuang Li 22:32 on 23 Feb 2005

Re: retrieve_all method to support order_by
Jonathan Tweed 22:37 on 23 Feb 2005

Generated at 20:58 on 02 Mar 2005 by mariachi v0.52