From: Matt S Trout Date: Sat, 12 Oct 2013 18:53:57 +0000 (+0000) Subject: respect order_is_stable even with no ORDER BY (assume single row return) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f8a557c249779d4a5140d8af94e54abf7756d0b3;p=dbsrgits%2FData-Query.git respect order_is_stable even with no ORDER BY (assume single row return) --- diff --git a/lib/Data/Query/Renderer/SQL/Slice/FetchFirst.pm b/lib/Data/Query/Renderer/SQL/Slice/FetchFirst.pm index 3cea06e..67b932e 100644 --- a/lib/Data/Query/Renderer/SQL/Slice/FetchFirst.pm +++ b/lib/Data/Query/Renderer/SQL/Slice/FetchFirst.pm @@ -35,8 +35,6 @@ sub _render_slice { } die "Slice's inner is not a Select" unless is_Select my $orig_select = $dq->{from}; - die "Slice's Select not followed by Order but order_is_stable set" - unless is_Order $orig_select->{from}; my %remapped = $self->_subquery_remap($orig_select); @@ -53,7 +51,7 @@ sub _render_slice { return $self->_render( map { - $dq->{preserve_order} + ($dq->{preserve_order} and @outside_order) ? Select( \@outside_select_list, compose {