in reply to Re: Class::DBI 'distinct' records
in thread Class::DBI 'distinct' records

Neither. I was hoping that there was a Class::DBI mechanism that would return only 'distinct' values without having to either:

a) filter the results of a Package->retrieve_all;

-or-

b) write a

Foo->set_sql(distinct => 'SELECT DISTINCT...')
...for any class that needs this functionality. I hope I am being clear this time. -Thanks

Replies are listed 'Best First'.
Re3: Class::DBI 'distinct' records
by dragonchild (Archbishop) on Oct 21, 2003 at 17:24 UTC
    I think the consensus is that there isn't a distinct() method. Why don't you write one and contribute back?

    ------
    We are the carpenters and bricklayers of the Information Age.

    The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

    ... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      I think you are right, it just seemed to me to be such a glaring ommission in an apparently popular module, I assumed that I had to be overlooking something.

      I think I will hack on my local copy and see what I come up with. Thanks for the replies.