From: Peter Rabbitson Date: Thu, 4 Feb 2010 13:34:45 +0000 (+0000) Subject: Prepare for new SQLA release X-Git-Tag: v0.08116~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0e5848787d1fb2d4914001586c456b456593e20;p=dbsrgits%2FDBIx-Class.git Prepare for new SQLA release --- diff --git a/t/93autocast.t b/t/93autocast.t index 4d9eee0..0a146a7 100644 --- a/t/93autocast.t +++ b/t/93autocast.t @@ -71,7 +71,7 @@ is_same_sql_bind ( WHERE cdid > CAST(? AS INT) AND tracks.last_updated_at IS NOT NULL - AND tracks.last_updated_on < CAST (? AS yyy) + AND tracks.last_updated_on < CAST (? AS DateTime) AND tracks.position = ? AND tracks.single_track = CAST(? AS INT) )', diff --git a/t/from_subquery.t b/t/from_subquery.t index 646fa6e..d206d0e 100644 --- a/t/from_subquery.t +++ b/t/from_subquery.t @@ -20,7 +20,7 @@ my $cdrs = $schema->resultset('CD'); is_same_sql_bind( $cdrs2->as_query, - "(SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE artist_id IN ( SELECT id FROM artist me LIMIT 1 ))", + "(SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE artist_id IN ( SELECT id FROM artist me LIMIT 1 ))", [], ); } @@ -73,7 +73,9 @@ my $cdrs = $schema->resultset('CD'); is_same_sql_bind( $rs->as_query, - "(SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track FROM (SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE ( id > ? ) ) cd2)", + "(SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track FROM ( + SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( id > ? ) + ) cd2)", [ [ 'id', 20 ] ], @@ -119,11 +121,11 @@ my $cdrs = $schema->resultset('CD'); is_same_sql_bind( $rs->as_query, - "(SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track - FROM - (SELECT cd3.cdid,cd3.artist,cd3.title,cd3.year,cd3.genreid,cd3.single_track - FROM - (SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track + "(SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track + FROM + (SELECT cd3.cdid, cd3.artist, cd3.title, cd3.year, cd3.genreid, cd3.single_track + FROM + (SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( id < ? ) ) cd3 WHERE ( id > ? ) ) cd2)", [ @@ -163,7 +165,9 @@ my $cdrs = $schema->resultset('CD'); is_same_sql_bind( $rs->as_query, - "(SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track FROM (SELECT me.cdid,me.artist,me.title,me.year,me.genreid,me.single_track FROM cd me WHERE ( title = ? ) ) cd2)", + "(SELECT cd2.cdid, cd2.artist, cd2.title, cd2.year, cd2.genreid, cd2.single_track FROM ( + SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me WHERE ( title = ? ) + ) cd2)", [ [ 'title', 'Thriller' ] ], ); }