PHP Class yii\db\mssql\PDO

It provides workarounds for improperly implemented functionalities of the MSSQL and DBLIB drivers.
Since: 2.0
Author: Timur Ruziev ([email protected])
Inheritance: extends PDO
Show file Open project: yiisoft/yii2

Public Methods

Method Description
beginTransaction ( ) : boolean Starts a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.
commit ( ) : boolean Commits a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.
getAttribute ( integer $attribute ) : mixed Retrieve a database connection attribute.
lastInsertId ( string | null $sequence = null ) : integer Returns value of the last inserted ID.
rollBack ( ) : boolean Rollbacks a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

Method Details

beginTransaction() public method

Starts a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.
public beginTransaction ( ) : boolean
return boolean the result of a transaction start.

commit() public method

Commits a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.
public commit ( ) : boolean
return boolean the result of a transaction commit.

getAttribute() public method

It is necessary to override PDO's method as some MSSQL PDO driver (e.g. dblib) does not support getting attributes
public getAttribute ( integer $attribute ) : mixed
$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.

lastInsertId() public method

Returns value of the last inserted ID.
public lastInsertId ( string | null $sequence = null ) : integer
$sequence string | null the sequence name. Defaults to null.
return integer last inserted ID value.

rollBack() public method

Rollbacks a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.
public rollBack ( ) : boolean
return boolean the result of a transaction roll back.