Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
14 | class Connection extends PDOConnection |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function __construct($dsn, $user = null, $password = null, ?array $options = null) |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * {@inheritDoc} |
||
27 | */ |
||
28 | public function lastInsertId($name = null) |
||
29 | { |
||
30 | if ($name === null) { |
||
31 | return parent::lastInsertId($name); |
||
32 | } |
||
33 | |||
34 | $stmt = $this->prepare('SELECT CONVERT(VARCHAR(MAX), current_value) FROM sys.sequences WHERE name = ?'); |
||
35 | $stmt->execute([$name]); |
||
36 | |||
37 | return $stmt->fetchColumn(); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * {@inheritDoc} |
||
42 | */ |
||
43 | public function quote($value, $type = ParameterType::STRING) |
||
53 | } |
||
54 | } |
||
55 |