Total Complexity | 7 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | trait Distinct |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @return $this |
||
25 | * @throws QueryException |
||
26 | */ |
||
27 | public function all() |
||
28 | { |
||
29 | $this->queryStructure->setElement( QueryStructure::DISTINCT, 0 ); |
||
30 | |||
31 | return $this; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return $this |
||
36 | */ |
||
37 | public function distinct() |
||
38 | { |
||
39 | $this->queryStructure->setElement( QueryStructure::DISTINCT, 1 ); |
||
40 | |||
41 | return $this; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function distinctRow() |
||
48 | { |
||
49 | $this->queryStructure->setElement( QueryStructure::DISTINCT, 2 ); |
||
50 | |||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | * @throws QueryException |
||
58 | */ |
||
59 | private function getDistinctSyntax() |
||
72 | } |
||
73 | |||
74 | } |
||
75 | |||
77 | } |