Total Complexity | 2 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | class SqlsrvPDO extends \PDO |
||
18 | { |
||
19 | /** |
||
20 | * Returns value of the last inserted ID. |
||
21 | * |
||
22 | * SQLSRV driver implements [[PDO::lastInsertId()]] method but with a single peculiarity: |
||
23 | * when `$sequence` value is a null or an empty string it returns an empty string. |
||
24 | * But when parameter is not specified it works as expected and returns actual |
||
25 | * last inserted ID (like the other PDO drivers). |
||
26 | * @param string|null $sequence the sequence name. Defaults to null. |
||
27 | * @return int last inserted ID value. |
||
28 | */ |
||
29 | public function lastInsertId($sequence = null) |
||
34 |