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