[Dbix-class] when no $cond, {} or undef?

islue islue.hu at gmail.com
Wed Jun 14 16:22:44 CEST 2006


DBIx::Class::ResultSet

A. $rs->count( {}, { group_by => 'age' } )
- SELECT COUNT( DISTINCT( age ) ) FROM ...
B. $rs->count( undef, { group_by => 'age' } )
- SELECT COUNT( * ) FROM ...

I thought there is no difference between {} and undef when no $cond.
After trace the sql statement, A works out what I want, but B not.
Is it a bug, or only {} is the right usage here?

--islue



More information about the Dbix-class mailing list