没有命名空间的类 yii yii\base yii\behaviors yii\caching yii\captcha yii\console yii\console\controllers yii\console\widgets yii\data yii\db yii\db\conditions yii\db\cubrid yii\db\cubrid\conditions yii\db\mssql yii\db\mssql\conditions yii\db\mysql yii\db\oci yii\db\oci\conditions yii\db\pgsql yii\db\sqlite yii\db\sqlite\conditions yii\di yii\filters yii\filters\auth yii\grid yii\helpers yii\i18n yii\log yii\mail yii\mutex yii\rbac yii\rest yii\test yii\validators yii\web yii\widgets

Class yii\db\mssql\PDO

继承yii\db\mssql\PDO » PDO
可用版本自2.0
源码 https://github.com/yiichina/yii2/blob/api/framework/db/mssql/PDO.php

This is an extension of the default PDO class of MSSQL and DBLIB drivers.

It provides workarounds for improperly implemented functionalities of the MSSQL and DBLIB drivers.

公共方法

隐藏继承的方法

方法描述被定义在
beginTransaction() Starts a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions. yii\db\mssql\PDO
commit() Commits a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions. yii\db\mssql\PDO
getAttribute() Retrieve a database connection attribute. yii\db\mssql\PDO
lastInsertId() Returns value of the last inserted ID. yii\db\mssql\PDO
rollBack() Rollbacks a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions. yii\db\mssql\PDO

方法详情

beginTransaction() 公共 方法

Starts a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

public boolean beginTransaction()
return boolean

The result of a transaction start.

commit() 公共 方法

Commits a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

public boolean commit()
return boolean

The result of a transaction commit.

getAttribute() 公共 方法

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.

lastInsertId() 公共 方法

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.

rollBack() 公共 方法

Rollbacks a transaction. It is necessary to override PDO's method as MSSQL PDO driver does not natively support transactions.

public boolean rollBack()
return boolean

The result of a transaction roll back.