Total Complexity | 5 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
16 | class Connection extends PDOConnection implements \Doctrine\DBAL\Driver\Connection |
||
17 | { |
||
18 | /** |
||
19 | * {@inheritDoc} |
||
20 | */ |
||
21 | public function lastInsertId($name = null) |
||
22 | { |
||
23 | if (null === $name) { |
||
24 | return parent::lastInsertId($name); |
||
25 | } |
||
26 | |||
27 | $stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'); |
||
28 | $stmt->execute([$name]); |
||
29 | |||
30 | return $stmt->fetchColumn(); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * {@inheritDoc} |
||
35 | */ |
||
36 | public function quote($value, $type = ParameterType::STRING) |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * {@inheritDoc} |
||
50 | */ |
||
51 | protected function createStatement(\PDOStatement $stmt) : PDOStatement |
||
54 | } |
||
55 | } |
||
56 |