[Dbix-class] Help with Problem with Distinct
Matt S Trout
dbix-class at trout.me.uk
Sat Feb 23 18:38:29 GMT 2008
On Thu, Feb 21, 2008 at 09:10:56AM +1100, Neil Lunn wrote:
>
>
> Matt Lawrence wrote:
> >You can pass distinct => 1 to the attributes to affect a GROUP BY
> >clause containing all columns, which should be logically equivalent
> >to SELECT DISTINCT
> >
> >{
> > select => [ 'm2.inventorycategoryid', 'c2.name' ],
> > distinct => 1,
> >}
> >
> Yes I do remember seeing that in the docs now. Thanks for the pointer.
> I wonder what then is the purpose of this construct?
>
> {
> select => [ { distinct => [ $source->columns ] } ],
> }
>
> As the array ref is parsed into : select distinct( col1, col2) ??
Patches to generate the correct SQL are welcome.
I suspect because there's an alternative way that works anybody who would
have patched it has simply switched.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the DBIx-Class
mailing list