From: Peter Rabbitson Date: Wed, 29 Apr 2009 08:24:20 +0000 (+0000) Subject: Add TODOs illustrating a problem with as_query X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c6137661a5ab0b02bb8654a6cf0c7bcc3052abf1;p=dbsrgits%2FDBIx-Class-Historic.git Add TODOs illustrating a problem with as_query --- diff --git a/t/76select.t b/t/76select.t index 0c85795..d10c081 100644 --- a/t/76select.t +++ b/t/76select.t @@ -9,7 +9,7 @@ use DBIC::SqlMakerTest; my $schema = DBICTest->init_schema(); -plan tests => 21; +plan tests => 23; my $rs = $schema->resultset('CD')->search({}, { @@ -85,10 +85,10 @@ $rs = $schema->resultset('CD')->search({}, ); my @query = @${$rs->as_query}; +TODO: { local $TODO = 'as_query() inconsistent'; is (scalar @query, 2, 'as_query() returned empty bindval arrayref') || push @query, [] } is_same_sql_bind ( @query, - [], '(SELECT me.cdid, me.title, artist.name FROM cd me JOIN artist artist ON artist.artistid = me.artist)', [], 'Use of columns attribute results in proper sql' @@ -120,10 +120,10 @@ $rs = $schema->resultset('CD')->search({}, ); @query = @${$rs->as_query}; +TODO: { local $TODO = 'as_query() inconsistent'; is (scalar @query, 2, 'as_query() returned empty bindval arrayref') || push @query, [] } is_same_sql_bind ( @query, - [], '(SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track, me.cdid, me.title, artist.name FROM cd me JOIN artist artist ON artist.artistid = me.artist)', [], 'Use of columns attribute results in proper sql'