[Bast-commits] r5686 - DBIx-Class/0.08/branches/prefetch/t

robkinyon at dev.catalyst.perl.org robkinyon at dev.catalyst.perl.org
Fri Mar 6 14:57:39 GMT 2009


Author: robkinyon
Date: 2009-03-06 14:57:38 +0000 (Fri, 06 Mar 2009)
New Revision: 5686

Modified:
   DBIx-Class/0.08/branches/prefetch/t/98rows_prefetch.t
Log:
Added solution, though no fix

Modified: DBIx-Class/0.08/branches/prefetch/t/98rows_prefetch.t
===================================================================
--- DBIx-Class/0.08/branches/prefetch/t/98rows_prefetch.t	2009-03-05 18:17:48 UTC (rev 5685)
+++ DBIx-Class/0.08/branches/prefetch/t/98rows_prefetch.t	2009-03-06 14:57:38 UTC (rev 5686)
@@ -41,27 +41,7 @@
     . " \$use_prefetch_count == $use_prefetch_count)"
   );
 }
-__END__
-my $rs1 = $schema->resultset('Artist')->search(
-    undef, {
-#        join => 'cds',
-    },
-);
-warn ${$rs1->as_query}->[0], $/;
-{ my @x = $rs1->all; warn "$#x\n"; }
 
-my $rs2 = $schema->resultset('Artist')->search(
-    undef, {
-        from => [{
-            me => $rs1->as_query,
-        }],
-        prefetch => 'cds',
-    },
-);
-
-warn ${$rs2->as_query}->[0], $/;
-{ my @x = $rs2->all; warn "$#x\n"; }
-
 __END__
 The fix is to, when using prefetch, take the query and put it into a subquery
 joined to the tables we're prefetching from. This might result in the same
@@ -99,6 +79,3 @@
 Problem:
   * The prefetch->join change needs to happen ONLY IF there are conditions
     that depend on bar being joined.
-  * How will this work when the $rs is further searched on? Those clauses
-    need to be added to the subquery, not the outer one. This is particularly
-    true if rows is added in the attribute later per the Pager.




More information about the Bast-commits mailing list