#653926 follow-up by Crell: Document SQL range limits.

merge-requests/26/head
Angie Byron 2009-12-13 18:06:48 +00:00
parent 634d308b4f
commit e5356ea62d
1 changed files with 4 additions and 0 deletions

View File

@ -1355,6 +1355,10 @@ class SelectQuery extends Query implements SelectQueryInterface {
}
// RANGE
// There is no universal SQL standard for handling range or limit clauses.
// Fortunately, all core-supported databases use the same range syntax.
// Databases that need a different syntax can override this method and
// do whatever alternate logic they need to.
if (!empty($this->range)) {
$query .= "\nLIMIT " . $this->range['length'] . " OFFSET " . $this->range['start'];
}