[Bast-commits] r9373 - DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/t

rbo at dev.catalyst.perl.org rbo at dev.catalyst.perl.org
Fri May 14 21:55:28 GMT 2010


Author: rbo
Date: 2010-05-14 22:55:28 +0100 (Fri, 14 May 2010)
New Revision: 9373

Modified:
   DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/t/73oracle.t
Log:
Enabled count sub query test, isn't broken anymore


Modified: DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/t/73oracle.t
===================================================================
--- DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/t/73oracle.t	2010-05-14 21:43:29 UTC (rev 9372)
+++ DBIx-Class/0.08/branches/oracle_hierarchical_queries_rt39121/t/73oracle.t	2010-05-14 21:55:28 UTC (rev 9373)
@@ -601,26 +601,26 @@
       # after count_subq, 
       # I will fix this later...
       # 
-      # is_same_sql_bind (
-      #   $rs->count_rs->as_query,
-      #   '( 
-      #       SELECT COUNT( * ) FROM (
-      #           SELECT artistid FROM (
-      #               SELECT artistid, ROWNUM rownum__index FROM (
-      #                   SELECT 
-      #                       me.artistid
-      #                   FROM artist me 
-      #                   START WITH name = ? 
-      #                   CONNECT BY artistid = PRIOR parentid 
-      #               ) me
-      #           ) me 
-      #           WHERE rownum__index BETWEEN 1 AND 2
-      #       ) me
-      #   )',
-      #   [ [ name => 'greatgrandchild' ] ],
-      # );
-      # 
-      # is( $rs->count, 2, 'Connect By; LIMIT count ok' );
+      is_same_sql_bind (
+        $rs->count_rs->as_query,
+        '( 
+            SELECT COUNT( * ) FROM (
+                SELECT artistid FROM (
+                    SELECT artistid, ROWNUM rownum__index FROM (
+                        SELECT 
+                            me.artistid
+                        FROM artist me 
+                        START WITH name = ? 
+                        CONNECT BY parentid = PRIOR artistid
+                    ) me
+                ) me 
+                WHERE rownum__index BETWEEN 1 AND 2
+            ) me
+        )',
+        [ [ name => 'root' ] ],
+      );
+
+      is( $rs->count, 2, 'Connect By; LIMIT count ok' );
     }
 
     # select the whole cycle tree without nocylce




More information about the Bast-commits mailing list