randomised crazy order by support for subquery remap
Matt S Trout [Thu, 23 Aug 2012 18:27:21 +0000 (18:27 +0000)]
lib/Data/Query/Renderer/SQL/Slice/SubqueryRemap.pm

index 261088e..325084b 100644 (file)
@@ -92,7 +92,9 @@ sub _subquery_remap {
               };
       Order($mapped_by, $_->{reverse});
     } else {
-      die "XXX not implemented yet";
+      my $name = sprintf("ORDER__BY__%03i",++$order_gensym_count);
+      push @inside_select_list, Alias($name, $by);
+      Order(Identifier($name), $_->{reverse});
     }
   } @inside_order;