Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function lastInsertId(?string $name = null) : string |
||
17 | { |
||
18 | if ($name !== null) { |
||
19 | // SQLite does not support sequences. However, PDO::lastInsertId() ignores the name parameter, and returns |
||
20 | // the last insert ID even if a sequence name is given. We expect an exception in that case. |
||
21 | throw new DriverException('SQLite does not support sequences.'); |
||
22 | } |
||
23 | |||
24 | return parent::lastInsertId(); |
||
25 | } |
||
27 |