[Bast-commits] r6309 - DBIx-Class/0.08/branches/top_limit_tweaks/t

frew at dev.catalyst.perl.org frew at dev.catalyst.perl.org
Mon May 18 20:56:43 GMT 2009


Author: frew
Date: 2009-05-18 20:56:43 +0000 (Mon, 18 May 2009)
New Revision: 6309

Modified:
   DBIx-Class/0.08/branches/top_limit_tweaks/t/42toplimit.t
Log:
Test to show top limit grouping problem

Modified: DBIx-Class/0.08/branches/top_limit_tweaks/t/42toplimit.t
===================================================================
--- DBIx-Class/0.08/branches/top_limit_tweaks/t/42toplimit.t	2009-05-18 20:25:42 UTC (rev 6308)
+++ DBIx-Class/0.08/branches/top_limit_tweaks/t/42toplimit.t	2009-05-18 20:56:43 UTC (rev 6309)
@@ -43,3 +43,10 @@
       ],
       expected_sql_order => ['foo ASC, bar DESC, baz ASC, frew ASC', 'foo DESC, bar ASC, baz DESC, frew DESC']
   });
+
+  is_same_sql(
+     $sa->select( 'foo', [qw{ bar baz}], undef, {
+           group_by => 'bar',
+           order_by => 'bar',
+    }, 1, 3),
+    "SELECT * FROM ( SELECT TOP 1 * FROM ( SELECT TOP 4 bar,baz FROM foo ORDER BY bar ASC GROUP BY bar ) AS foo ORDER BY bar DESC ) AS bar ORDER BY bar ASC");




More information about the Bast-commits mailing list