system system.base system.caching system.caching.dependencies system.collections system.console system.db system.db.ar system.db.schema system.db.schema.cubrid system.db.schema.mssql system.db.schema.mysql system.db.schema.oci system.db.schema.pgsql system.db.schema.sqlite system.gii system.i18n system.i18n.gettext system.logging system.test system.utils system.validators system.web system.web.actions system.web.auth system.web.filters system.web.form system.web.helpers system.web.renderers system.web.services system.web.widgets system.web.widgets.captcha system.web.widgets.pagers zii.behaviors zii.widgets zii.widgets.grid zii.widgets.jui

CMssqlPdoAdapter

system.db.schema.mssql
继承 class CMssqlPdoAdapter » PDO
源码 framework/db/schema/mssql/CMssqlPdoAdapter.php
This is an extension of default PDO class for mssql driver only It provides some missing functionalities of pdo driver

公共方法

隐藏继承的方法

方法描述被定义在
__construct() PDO
__sleep() PDO
__wakeup() PDO
beginTransaction() Begin a transaction CMssqlPdoAdapter
commit() Commit a transaction CMssqlPdoAdapter
errorCode() PDO
errorInfo() PDO
exec() PDO
getAttribute() PDO
getAvailableDrivers() PDO
inTransaction() PDO
lastInsertId() Get the last inserted id value CMssqlPdoAdapter
prepare() PDO
query() PDO
quote() PDO
rollBack() Rollback a transaction CMssqlPdoAdapter
setAttribute() PDO

方法详情

beginTransaction() 方法
public boolean beginTransaction()
{return} boolean
源码: framework/db/schema/mssql/CMssqlPdoAdapter.php#39 (显示)
public function beginTransaction ()
{
    
$this->exec('BEGIN TRANSACTION');
    return 
true;
}

Begin a transaction

Is is necessary to override pdo's method, as mssql pdo drivers does not support transaction

commit() 方法
public boolean commit()
{return} boolean
源码: framework/db/schema/mssql/CMssqlPdoAdapter.php#53 (显示)
public function commit ()
{
    
$this->exec('COMMIT TRANSACTION');
    return 
true;
}

Commit a transaction

Is is necessary to override pdo's method, as mssql pdo drivers does not support transaction

lastInsertId() 方法
public integer lastInsertId(string|null $sequence=NULL)
$sequence string|null sequence name. Defaults to null
{return} integer last inserted id
源码: framework/db/schema/mssql/CMssqlPdoAdapter.php#26 (显示)
public function lastInsertId ($sequence=NULL)
{
    return 
$this->query('SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS bigint)')->fetchColumn();
}

Get the last inserted id value MSSQL doesn't support sequence, so, argument is ignored

rollBack() 方法
public boolean rollBack()
{return} boolean
源码: framework/db/schema/mssql/CMssqlPdoAdapter.php#67 (显示)
public function rollBack ()
{
    
$this->exec('ROLLBACK TRANSACTION');
    return 
true;
}

Rollback a transaction

Is is necessary to override pdo's method, ac mssql pdo drivers does not support transaction