Total Complexity | 15 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Select extends AbstractQuery |
||
6 | { |
||
7 | public ?string $where; |
||
8 | public ?string $having; |
||
9 | public ?string $limit; |
||
10 | public ?string $order; |
||
11 | public string $expression = '*'; |
||
12 | public bool $calcFoundRows = false; |
||
13 | |||
14 | 17 | public function expression(string $expression): Select |
|
15 | { |
||
16 | 17 | $this->expression = $expression; |
|
17 | 17 | return $this; |
|
18 | } |
||
19 | |||
20 | 84 | public function where(string $where): Select |
|
21 | { |
||
22 | 84 | $this->where = $where; |
|
23 | 84 | return $this; |
|
24 | } |
||
25 | |||
26 | 1 | public function having(string $having): Select |
|
27 | { |
||
28 | 1 | $this->having = $having; |
|
29 | 1 | return $this; |
|
30 | } |
||
31 | |||
32 | 83 | public function limit(string $limit): Select |
|
33 | { |
||
34 | 83 | if (!empty($limit)) { |
|
35 | 83 | $this->limit = $limit; |
|
36 | } |
||
37 | 83 | return $this; |
|
38 | } |
||
39 | |||
40 | 84 | public function order(string $order): Select |
|
46 | } |
||
47 | |||
48 | 13 | public function calcFoundRows(): Select |
|
49 | { |
||
52 | } |
||
53 | |||
54 | 94 | public function __toString(): string |
|
72 |