From: Peter Rabbitson Date: Tue, 24 Nov 2009 18:48:01 +0000 (+0000) Subject: Extra sqla quoting test(2) X-Git-Tag: v0.08116~125 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9611a147c72f702beea7764cd8ca75bbde17494f;p=dbsrgits%2FDBIx-Class.git Extra sqla quoting test(2) --- diff --git a/t/95sql_maker_quote.t b/t/95sql_maker_quote.t index d9e40a3..dce696b 100644 --- a/t/95sql_maker_quote.t +++ b/t/95sql_maker_quote.t @@ -239,6 +239,21 @@ is_same_sql_bind( $sql, \@bind, q/SELECT `me`.`cdid`, `me`.`artist`, `me`.`title` FROM `cd` `me` WHERE ( `cdid` rlike ? ) GROUP BY `title` HAVING count(me.artist) > ?/, [ [ cdid => 'X'], ['cnt' => '2'] ], + 'Quoting works with where/having arrayrefsrefs', +); + + +($sql, @bind) = $sql_maker->select( + [ { me => 'cd' } ], + [qw/ me.cdid me.artist me.title /], + { cdid => \'rlike X' }, + { group_by => 'title', having => \'count(me.artist) > 2' }, +); + +is_same_sql_bind( + $sql, \@bind, + q/SELECT `me`.`cdid`, `me`.`artist`, `me`.`title` FROM `cd` `me` WHERE ( `cdid` rlike X ) GROUP BY `title` HAVING count(me.artist) > 2/, + [], 'Quoting works with where/having scalarrefs', );