Re: [Dbix-class] 2-argument SQL agregates

2006-03-28 Thread Matt S Trout
Doran L. Barton wrote: > Doran L. Barton wrote: >> Matt S Trout wrote: >>> Doran L. Barton wrote: I specifically need to use the TO_CHAR() function which takes a field name and a format string: SELECT foo, TO_CHAR('bar', 'Month DD Y') FROM Artist >>> { TO_CHAR => [ 'bar',

Re: [Dbix-class] 2-argument SQL agregates

2006-03-28 Thread Matt S Trout
Doran L. Barton wrote: > Matt S Trout wrote: >> Doran L. Barton wrote: >>> I specifically need to use the TO_CHAR() function which takes a field >>> name and a format string: >>> >>> SELECT foo, TO_CHAR('bar', 'Month DD Y') FROM Artist >> { TO_CHAR => [ 'bar', 'Month DD ' ] } ? >> >> Al

Re: [Dbix-class] 2-argument SQL agregates

2006-03-28 Thread Doran L. Barton
Doran L. Barton wrote: > Matt S Trout wrote: >> Doran L. Barton wrote: >>> I specifically need to use the TO_CHAR() function which takes a field >>> name and a format string: >>> >>> SELECT foo, TO_CHAR('bar', 'Month DD Y') FROM Artist >> { TO_CHAR => [ 'bar', 'Month DD ' ] } ? >> >> Al

Re: [Dbix-class] 2-argument SQL agregates

2006-03-28 Thread Doran L. Barton
Matt S Trout wrote: > Doran L. Barton wrote: >> I specifically need to use the TO_CHAR() function which takes a field >> name and a format string: >> >> SELECT foo, TO_CHAR('bar', 'Month DD Y') FROM Artist > > { TO_CHAR => [ 'bar', 'Month DD ' ] } ? > > Always try the obvious thing f

Re: [Dbix-class] 2-argument SQL agregates

2006-03-28 Thread Matt S Trout
Doran L. Barton wrote: > I need some help figuring out if it's possible, and if so how, to > specify a 2-argument aggregate function for a search query using > DBIx::Class. > > The examples in the docs say you can do this: > > my $rs = $schema->resultset(’Artist’)->search( > {},