| @@ 1420-1429 (lines=10) @@ | ||
| 1417 | * @param int|\Cake\Database\ExpressionInterface|null $num number of records to be returned |
|
| 1418 | * @return $this |
|
| 1419 | */ |
|
| 1420 | public function limit($num) |
|
| 1421 | { |
|
| 1422 | $this->_dirty(); |
|
| 1423 | if ($num !== null && !is_object($num)) { |
|
| 1424 | $num = (int)$num; |
|
| 1425 | } |
|
| 1426 | $this->_parts['limit'] = $num; |
|
| 1427 | ||
| 1428 | return $this; |
|
| 1429 | } |
|
| 1430 | ||
| 1431 | /** |
|
| 1432 | * Sets the number of records that should be skipped from the original result set |
|
| @@ 1449-1458 (lines=10) @@ | ||
| 1446 | * @param int|\Cake\Database\ExpressionInterface|null $num number of records to be skipped |
|
| 1447 | * @return $this |
|
| 1448 | */ |
|
| 1449 | public function offset($num) |
|
| 1450 | { |
|
| 1451 | $this->_dirty(); |
|
| 1452 | if ($num !== null && !is_object($num)) { |
|
| 1453 | $num = (int)$num; |
|
| 1454 | } |
|
| 1455 | $this->_parts['offset'] = $num; |
|
| 1456 | ||
| 1457 | return $this; |
|
| 1458 | } |
|
| 1459 | ||
| 1460 | /** |
|
| 1461 | * Adds a complete query to be used in conjunction with an UNION operator with |
|