@@ 40-46 (lines=7) @@ | ||
37 | public function limit(/*# int */ $count, /*# int */ $offset = 0) |
|
38 | { |
|
39 | $clause = &$this->getClause('LIMIT'); |
|
40 | if ($count || $offset) { |
|
41 | if (!empty($clause)) { |
|
42 | $clause[0] = (int) $count; |
|
43 | } else { |
|
44 | $clause = [(int) $count, (int) $offset]; |
|
45 | } |
|
46 | } |
|
47 | return $this; |
|
48 | } |
|
49 | ||
@@ 56-60 (lines=5) @@ | ||
53 | public function offset(/*# int */ $offset) |
|
54 | { |
|
55 | $clause = &$this->getClause('LIMIT'); |
|
56 | if (!empty($clause)) { |
|
57 | $clause[1] = (int) $offset; |
|
58 | } else { |
|
59 | $clause = [-1, (int) $offset]; |
|
60 | } |
|
61 | return $this; |
|
62 | } |
|
63 |