Skip Menu |

This queue is for tickets about the Class-DBI-Plugin-AbstractCount CPAN distribution.

Report information
The Basics
Id: 18592
Status: resolved
Priority: 0/
Queue: Class-DBI-Plugin-AbstractCount

People
Owner: j.-c.zeus [...] web.de
Requestors: gerryster [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.06
Fixed in: (no value)



Subject: does not allow for complicated SQL::Abstract queries
Due to the column and attribute checking, it is not possible to pass in complex queries that would work with SQL::Abstract. For example, this query from the SQL::Abstract documentation would die with: a "and" is not a column/accessor of class error my @where = ( -and => [ user => 'nwiger', -nest => [ -and => [workhrs => {'>', 20}, geo => 'ASIA' ], -and => [workhrs => {'<', 50}, geo => 'EURO' ] ], ], ); The column checking as implemented is not appropriate for a more complex query even if the Class::DBI model had user and workhrs attributes. Also, I am not sure the function checking conditional in your module works as you would expect: # Check for functions if ( index( $column, '(' ) && index( $column, ')' )) This returns true if there are no parenthesis in $column. I think this should be: # Check for functions if ( index( $column, '(' ) > 0 && index( $column, ')' ) > 1)
This bug is really quite important, and should be fixed. -- rjbs
The issue is now fixed. Some more tests would be useful, though. The suggested change for function checking has been applied.