[Dbix-class] Removing quote chars from HAVING terms?

Ben Vinnerd dbix-class at lists.scsys.co.uk
Wed Apr 8 08:33:37 GMT 2009


Chris Burch wrote:
> Hello,
> 
> Because I have to use MS SQL Server, in my connect_info I set quote_char => [qw/[ ]/ and name_sep => '.'
> 
> However, the quote characters go around things they shouldn't. E.g.
> 
>       having => { 'count(me.[sectionid])' => { '=', $section_ct } },
> 
> becomes in SQL
> 
>  HAVING [count(me.[sectionid])] = ?
> 
> which is incorrect.
> 
> Is there a way around this? I tried \'count(me.[sectionid])' , analogous to passing a scalar ref to order_by, but having doesn't dereference it.

Have you tried...

having => \"count(me.[sectionid]) = $section_ct",

?



More information about the DBIx-Class mailing list