From: Matt S Trout Date: Fri, 17 Aug 2012 12:40:01 +0000 (+0100) Subject: working RowNum.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=29b2daceb4fd02ededa0bde8b0f1a15f9488af3e;p=dbsrgits%2FData-Query.git working RowNum.pm --- diff --git a/lib/Data/Query/Renderer/SQL/Slice/RowNum.pm b/lib/Data/Query/Renderer/SQL/Slice/RowNum.pm index c14790a..7b90fcf 100644 --- a/lib/Data/Query/Renderer/SQL/Slice/RowNum.pm +++ b/lib/Data/Query/Renderer/SQL/Slice/RowNum.pm @@ -45,7 +45,7 @@ sub _render_slice { Where( Operator( { 'SQL.Naive' => '>=' }, - [ Identifier($rownum_name), $limit_plus_offset, ] + [ Identifier($rownum_name), $offset_plus ] ), Alias( $remapped{default_inside_alias}, @@ -55,7 +55,7 @@ sub _render_slice { Where( Operator( { 'SQL.Naive' => '<=' }, - [ Literal(SQL => 'ROWNUM'), $offset_plus ] + [ Literal(SQL => 'ROWNUM'), $limit_plus_offset ] ), $inside_select, ) @@ -71,7 +71,7 @@ sub _render_slice { Where( Operator( { 'SQL.Naive' => 'BETWEEN' }, - [ Identifier($rownum_name), $limit_plus_offset, $offset_plus ] + [ Identifier($rownum_name), $offset_plus, $limit_plus_offset ] ), Alias( $remapped{default_inside_alias},