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