lithium\data\source\Database::limit()
Returns a LIMIT statement from the given limit and the offset of the context object.
Parameters
-
integer
$limit
-
\lithium\data\model\Query
$context
Returns
stringSource
public function limit($limit, $context) {
if (!$limit) {
return;
}
if ($offset = $context->offset() ?: '') {
$offset = " OFFSET {$offset}";
}
return "LIMIT {$limit}{$offset}";
}