Preserve NULLS ordering in SubqueryRemap
Dagfinn Ilmari Mannsåker [Fri, 22 Mar 2013 23:12:43 +0000 (23:12 +0000)]
lib/Data/Query/Renderer/SQL/Slice/SubqueryRemap.pm

index 325084b..631b6be 100644 (file)
@@ -90,11 +90,11 @@ sub _subquery_remap {
                   Identifier($name);
                 }
               };
-      Order($mapped_by, $_->{reverse});
+      Order($mapped_by, $_->{reverse}, $_->{nulls});
     } else {
       my $name = sprintf("ORDER__BY__%03i",++$order_gensym_count);
       push @inside_select_list, Alias($name, $by);
-      Order(Identifier($name), $_->{reverse});
+      Order(Identifier($name), $_->{reverse}, $_->{nulls});
     }
   } @inside_order;