2008-09-12 12:51:56 +04:00
|
|
|
<?php
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\DBAL\Driver\PDOMsSql;
|
2008-09-12 12:51:56 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* MsSql Connection implementation.
|
|
|
|
*
|
|
|
|
* @since 2.0
|
|
|
|
*/
|
2009-02-20 08:46:20 +03:00
|
|
|
class Connection extends PDO implements \Doctrine\DBAL\Driver\PDOConnection
|
2008-09-12 12:51:56 +04:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Performs the rollback.
|
|
|
|
*
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function rollback()
|
|
|
|
{
|
|
|
|
$this->exec('ROLLBACK TRANSACTION');
|
|
|
|
}
|
2009-02-20 08:46:20 +03:00
|
|
|
|
2008-09-12 12:51:56 +04:00
|
|
|
/**
|
|
|
|
* Performs the commit.
|
|
|
|
*
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function commit()
|
|
|
|
{
|
|
|
|
$this->exec('COMMIT TRANSACTION');
|
|
|
|
}
|
2009-02-20 08:46:20 +03:00
|
|
|
|
2008-09-12 12:51:56 +04:00
|
|
|
/**
|
|
|
|
* Begins a database transaction.
|
|
|
|
*
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
public function beginTransaction()
|
|
|
|
{
|
|
|
|
$this->exec('BEGIN TRANSACTION');
|
|
|
|
}
|
2009-02-20 08:46:20 +03:00
|
|
|
}
|