Versions
Look up a class, method, property or event

CMssqlPdoAdapter

Package system.db.schema.mssql
Inheritance class CMssqlPdoAdapter » PDO
Source Code 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

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__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

Method Details

beginTransaction() method
public boolean beginTransaction()
{return} boolean
Source Code: framework/db/schema/mssql/CMssqlPdoAdapter.php#39 (show)
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() method
public boolean commit()
{return} boolean
Source Code: framework/db/schema/mssql/CMssqlPdoAdapter.php#53 (show)
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() method
public integer lastInsertId(string|null $sequence=NULL)
$sequence string|null sequence name. Defaults to null
{return} integer last inserted id
Source Code: framework/db/schema/mssql/CMssqlPdoAdapter.php#26 (show)
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() method
public boolean rollBack()
{return} boolean
Source Code: framework/db/schema/mssql/CMssqlPdoAdapter.php#67 (show)
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

Be the first person to leave a comment

Please to leave your comment.