Failed Conditions
Pull Request — master (#3759)
by Benjamin
65:18
created

Connection::getSequenceNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Driver\PDOSqlite;
6
7
use Doctrine\DBAL\Driver\PDOConnection;
8
use Doctrine\DBAL\Driver\PDOException;
9
10
/**
11
 * SQLite Connection implementation.
12
 */
13
class Connection extends PDOConnection
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getSequenceNumber(string $name)
19
    {
20
        // SQLite does not support sequences. However, PDO::lastInsertId() ignores the name parameter, and returns
21
        // the last insert ID even if a sequence name is given. We expect an exception in that case.
22
        throw new PDOException('SQLite does not support sequences.');
23
    }
24
}
25