Commit 02ed1d6d authored by Lukas Kahwe Smith's avatar Lukas Kahwe Smith Committed by Juozas Kaziukenas

MSSQL does support savepoints

parent 2636656b
......@@ -61,12 +61,11 @@ class MsSqlPlatform extends AbstractPlatform
}
/**
* Whether the platform supports savepoints. MsSql does not.
* Whether the platform supports releasing savepoints.
*
* @return boolean
* @override
*/
public function supportsSavepoints()
public function supportsReleaseSavepoints()
{
return false;
}
......@@ -686,4 +685,37 @@ DROP DATABASE ' . $name . ';';
'image' => 'text',
);
}
/**
* 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