Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
51 | public function getIdentifierQuoter(\PDO $dbh): callable |
||
52 | { |
||
53 | if ($this->isMySQL($dbh)) { |
||
54 | // mysql mode |
||
55 | return function ($identifier) { |
||
56 | return '`' . str_replace('`', '``', $identifier) . '`'; |
||
57 | }; |
||
58 | } |
||
59 | |||
60 | // standard sql mode |
||
61 | return function ($identifier) { |
||
62 | return '"' . str_replace('"', '""', $identifier) . '"'; |
||
63 | }; |
||
64 | } |
||
65 | } |
||
66 |