Skip to content

Commit

Permalink
fix: paging
Browse files Browse the repository at this point in the history
revert: #611
fix: #651
  • Loading branch information
yajra committed May 7, 2024
1 parent 79b22dd commit 46d6cf5
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Oci8/Query/Grammars/OracleGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,6 @@ protected function compileTableExpression($sql, $constraint, $query)
return "select * from ({$sql}) where rownum {$constraint}";
}

if (! is_null($query->limit && ! is_null($query->offset))) {
$start = $query->offset + 1;
$finish = $query->offset + $query->limit;

return "select t2.* from ( select rownum AS \"rn\", t1.* from ({$sql}) t1 where rownum <= {$finish}) t2 where t2.\"rn\" >= {$start}";
}

return "select t2.* from ( select rownum AS \"rn\", t1.* from ({$sql}) t1 ) t2 where t2.\"rn\" {$constraint}";
}

Expand Down

0 comments on commit 46d6cf5

Please sign in to comment.