mirror of
https://github.com/dg/dibi.git
synced 2025-08-31 01:39:46 +02:00
applyLimit support
This commit is contained in:
@@ -148,6 +148,19 @@ class DibiPostgreDriver extends DibiDriver {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see DibiDriver::applyLimit()
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset = 0)
|
||||
{
|
||||
if ($limit >= 0)
|
||||
$sql .= ' LIMIT ' . (int) $limit;
|
||||
|
||||
if ($offset > 0)
|
||||
$sql .= ' OFFSET ' . (int) $offset;
|
||||
}
|
||||
|
||||
|
||||
} // class DibiPostgreDriver
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user