Commit d0b50c6e authored by Lukas Kahwe Smith's avatar Lukas Kahwe Smith

MSSQL does support savepoints

parent 3b79401b
...@@ -61,12 +61,11 @@ class MsSqlPlatform extends AbstractPlatform ...@@ -61,12 +61,11 @@ class MsSqlPlatform extends AbstractPlatform
} }
/** /**
* Whether the platform supports savepoints. MsSql does not. * Whether the platform supports releasing savepoints.
* *
* @return boolean * @return boolean
* @override
*/ */
public function supportsSavepoints() public function supportsReleaseSavepoints()
{ {
return false; return false;
} }
...@@ -666,4 +665,37 @@ DROP DATABASE ' . $name . ';'; ...@@ -666,4 +665,37 @@ DROP DATABASE ' . $name . ';';
{ {
} }
/**
* Generate SQL to create a new savepoint
*
* @param string $savepoint
* @return string
*/
public function createSavePoint($savepoint)
{
return 'SAVE TRANSACTION ' . $savepoint;
}
/**
* Generate SQL to release a savepoint
*
* @param string $savepoint
* @return string
*/
public function releaseSavePoint($savepoint)
{
return '';
}
/**
* Generate SQL to rollback a savepoint
*
* @param string $savepoint
* @return string
*/
public function rollbackSavePoint($savepoint)
{
return 'ROLLBACK TRANSACTION ' . $savepoint;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment