Class yii\db\mssql\DBLibPDO
Inheritance | yii\db\mssql\DBLibPDO » PDO |
---|---|
Available since version | 2.0 |
Source Code | https://github.com/yiisoft/yii2/blob/master/framework/db/mssql/DBLibPDO.php |
This is an extension of the default PDO class of DBLIB drivers.
It provides workarounds for improperly implemented functionalities of the DBLIB drivers.
Public Methods
Method | Description | Defined By |
---|---|---|
getAttribute() | Retrieve a database connection attribute. | yii\db\mssql\DBLibPDO |
lastInsertId() | Returns value of the last inserted ID. | yii\db\mssql\DBLibPDO |
Method Details
Retrieve a database connection attribute.
It is necessary to override PDO's method as some MSSQL PDO driver (e.g. dblib) does not support getting attributes.
public mixed getAttribute ( $attribute ) | ||
$attribute | integer | One of the PDO::ATTR_* constants. |
return | mixed | A successful call returns the value of the requested PDO attribute. An unsuccessful call returns null. |
---|
Returns value of the last inserted ID.
public integer lastInsertId ( $sequence = null ) | ||
$sequence | string|null | The sequence name. Defaults to null. |
return | integer | Last inserted ID value. |
---|
Signup or Login in order to comment.