mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 06:05:53 +00:00
API CHANGE Renamed transactions methods from endTransaction() to transactionEnd(), startTransaction() to transactionStart() to comply with new sapphire trunk API
This commit is contained in:
parent
e15e444acc
commit
6f5de764d2
@ -1476,9 +1476,16 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start transaction. READ ONLY not supported.
|
* @deprecated Use transactionStart() (method required for 2.4.x)
|
||||||
*/
|
*/
|
||||||
public function startTransaction($transaction_mode=false, $session_characteristics=false){
|
public function startTransaction($transaction_mode=false, $session_characteristics=false){
|
||||||
|
$this->transactionStart($transaction_mode, $session_characteristics);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start transaction. READ ONLY not supported.
|
||||||
|
*/
|
||||||
|
public function transactionStart($transaction_mode=false, $session_characteristics=false){
|
||||||
if($this->mssql) {
|
if($this->mssql) {
|
||||||
DB::query('BEGIN TRANSACTION');
|
DB::query('BEGIN TRANSACTION');
|
||||||
} else {
|
} else {
|
||||||
@ -1513,9 +1520,16 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Commit everything inside this transaction so far
|
* @deprecated Use transactionEnd() (method required for 2.4.x)
|
||||||
*/
|
*/
|
||||||
public function endTransaction(){
|
public function endTransaction(){
|
||||||
|
$this->transactionEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Commit everything inside this transaction so far
|
||||||
|
*/
|
||||||
|
public function transactionEnd(){
|
||||||
if($this->mssql) {
|
if($this->mssql) {
|
||||||
DB::query('COMMIT TRANSACTION');
|
DB::query('COMMIT TRANSACTION');
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user