mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 14:16:39 +02:00
- implemented savepoints support
This commit is contained in:
@@ -137,7 +137,7 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
if (is_resource($res)) {
|
||||
$row = mssql_fetch_row($res);
|
||||
return $row[0];
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -145,10 +145,11 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Begins a transaction (if supported).
|
||||
* @param string optinal savepoint name
|
||||
* @return void
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
public function begin()
|
||||
public function begin($savepoint = NULL)
|
||||
{
|
||||
$this->query('BEGIN TRANSACTION');
|
||||
}
|
||||
@@ -157,10 +158,11 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Commits statements in a transaction.
|
||||
* @param string optinal savepoint name
|
||||
* @return void
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
public function commit()
|
||||
public function commit($savepoint = NULL)
|
||||
{
|
||||
$this->query('COMMIT');
|
||||
}
|
||||
@@ -169,10 +171,11 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
||||
|
||||
/**
|
||||
* Rollback changes in a transaction.
|
||||
* @param string optinal savepoint name
|
||||
* @return void
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
public function rollback()
|
||||
public function rollback($savepoint = NULL)
|
||||
{
|
||||
$this->query('ROLLBACK');
|
||||
}
|
||||
|
Reference in New Issue
Block a user