[Bast-commits] r5452 - in DBIx-Class/0.08/branches/subquery:
lib/DBIx/Class lib/DBIx/Class/Storage/DBI t/resultset
robkinyon at dev.catalyst.perl.org
robkinyon at dev.catalyst.perl.org
Wed Feb 11 14:45:23 GMT 2009
Author: robkinyon
Date: 2009-02-11 14:45:23 +0000 (Wed, 11 Feb 2009)
New Revision: 5452
Modified:
DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSetColumn.pm
DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/Storage/DBI/Cursor.pm
DBIx-Class/0.08/branches/subquery/t/resultset/as_query.t
Log:
check in bombing test for subquery-with-as_query
Modified: DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm 2009-02-11 14:38:08 UTC (rev 5451)
+++ DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSet.pm 2009-02-11 14:45:23 UTC (rev 5452)
@@ -1715,7 +1715,7 @@
=item Arguments: none
-=item Return Value: [ $sql, @bind ]
+=item Return Value: \[ $sql, @bind ]
=back
Modified: DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSetColumn.pm
===================================================================
--- DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSetColumn.pm 2009-02-11 14:38:08 UTC (rev 5451)
+++ DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/ResultSetColumn.pm 2009-02-11 14:45:23 UTC (rev 5452)
@@ -60,7 +60,7 @@
=item Arguments: none
-=item Return Value: [ $sql, @bind ]
+=item Return Value: \[ $sql, @bind ]
=back
Modified: DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/Storage/DBI/Cursor.pm
===================================================================
--- DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/Storage/DBI/Cursor.pm 2009-02-11 14:38:08 UTC (rev 5451)
+++ DBIx-Class/0.08/branches/subquery/lib/DBIx/Class/Storage/DBI/Cursor.pm 2009-02-11 14:45:23 UTC (rev 5452)
@@ -55,7 +55,7 @@
=item Arguments: none
-=item Return Value: [ $sql, @bind ]
+=item Return Value: \[ $sql, @bind ]
=back
@@ -72,7 +72,7 @@
my @args = $storage->_select_args(@{$self->{args}});
my ($sql, $bind) = $storage->_prep_for_execute(@args[0 .. 2], [@args[4 .. $#args]]);
- return [ $sql, @$bind ];
+ return \[ $sql, @$bind ];
}
=head2 next
Modified: DBIx-Class/0.08/branches/subquery/t/resultset/as_query.t
===================================================================
--- DBIx-Class/0.08/branches/subquery/t/resultset/as_query.t 2009-02-11 14:38:08 UTC (rev 5451)
+++ DBIx-Class/0.08/branches/subquery/t/resultset/as_query.t 2009-02-11 14:45:23 UTC (rev 5452)
@@ -10,12 +10,13 @@
plan tests => 4;
-my $schema = DBICTest->init_schema();
-my $art_rs = $schema->resultset('Artist');
+my $schema = DBICTest->init_schema();
+my $art_rs = $schema->resultset('Artist');
+my $cdrs = $schema->resultset('CD');
{
my $arr = $art_rs->as_query;
- my ($query, @bind) = @$arr;
+ my ($query, @bind) = @{$$arr};
is_same_sql_bind(
$query, \@bind,
@@ -27,7 +28,7 @@
{
my $arr = $art_rs->as_query;
- my ($query, @bind) = @$arr;
+ my ($query, @bind) = @{$$arr};
is_same_sql_bind(
$query, \@bind,
@@ -40,7 +41,7 @@
{
my $arr = $art_rs->as_query;
- my ($query, @bind) = @$arr;
+ my ($query, @bind) = @{$$arr};
is_same_sql_bind(
$query, \@bind,
@@ -53,7 +54,7 @@
{
my $arr = $rscol->as_query;
- my ($query, @bind) = @$arr;
+ my ($query, @bind) = @{$$arr};
is_same_sql_bind(
$query, \@bind,
@@ -62,4 +63,18 @@
);
}
+my $cdrs2 = $cdrs->search({
+ artist_id => {
+ -in => $art_rs->get_column( 'id' )->as_query,
+ },
+});
+
+my @x = $cdrs2->all;
+use Data::Dumper; warn Dumper \@x;
__END__
+{
+ my $arr = $cdrs2->as_query;
+ my ($query, @bind) = @{$$arr};
+}
+
+__END__
More information about the Bast-commits
mailing list