Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | trait Utilities |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @return $this |
||
23 | * @throws \Qpdb\QueryBuilder\Dependencies\QueryException |
||
24 | */ |
||
25 | public function explain() |
||
26 | { |
||
27 | $this->queryStructure->setElement( QueryStructure::EXPLAIN, 1 ); |
||
28 | |||
29 | return $this; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | protected function getExplainSyntax() |
||
36 | { |
||
37 | if ( $this->queryStructure->getElement( QueryStructure::EXPLAIN ) ) |
||
38 | return 'EXPLAIN'; |
||
39 | |||
40 | return ''; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * @param string $comment |
||
45 | * @return $this |
||
46 | * @throws \Qpdb\QueryBuilder\Dependencies\QueryException |
||
47 | */ |
||
48 | public function withComment( $comment = '' ) |
||
49 | { |
||
50 | $this->queryStructure->setElement( QueryStructure::QUERY_COMMENT, $comment ); |
||
51 | |||
52 | return $this; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param string $identifier |
||
57 | * @return $this |
||
58 | * @throws \Qpdb\QueryBuilder\Dependencies\QueryException |
||
59 | */ |
||
60 | public function withLogIdentifier( $identifier = null ) |
||
65 | } |
||
66 | |||
67 | } |