Skip to content

Commit

Permalink
Hotfix: SQLite supports null limit via LIMIT -1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jan 23, 2015
1 parent 1783d6f commit 74f2bee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SqlitePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,18 @@ protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff)
return $sql;
}

/**
* {@inheritDoc}
*/
protected function doModifyLimitQuery($query, $limit, $offset)
{
if (null === $limit && null !== $offset) {
return $query . ' LIMIT -1 OFFSET ' . $offset;
}

return parent::doModifyLimitQuery($query, $limit, $offset);
}

/**
* {@inheritDoc}
*/
Expand Down

0 comments on commit 74f2bee

Please sign in to comment.