| Total Lines | 13 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 4 | public function lastInsertId(?string $name = null) : string |
|
| 17 | { |
||
| 18 | 4 | 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 | |||
| 22 | // WIP regarding exceptions, see: |
||
| 23 | // https://github.com/doctrine/dbal/pull/3335#discussion_r234381175 |
||
| 24 | throw new class ('SQLite does not support sequences.') extends AbstractDriverException { |
||
| 25 | }; |
||
| 26 | } |
||
| 27 | |||
| 28 | 3 | return parent::lastInsertId(); |
|
| 29 | } |
||
| 31 |