Commit f0ed949c authored by Steve Müller's avatar Steve Müller

fixed CS, added use statement and added return statements to if blocks.

parent 6af7845c
......@@ -20,6 +20,7 @@
namespace Doctrine\DBAL\Platforms;
use Doctrine\DBAL\LockMode;
use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
......@@ -846,19 +847,19 @@ class SQLServerPlatform extends AbstractPlatform
*/
public function appendLockHint($fromClause, $lockMode)
{
$tableHint = '';
if ($lockMode == \Doctrine\DBAL\LockMode::NONE) {
$tableHint = ' WITH (READUNCOMMITTED)'; // equivalent to NOLOCK
if ($lockMode == LockMode::NONE) {
return $fromClause . ' WITH (READUNCOMMITTED)'; // equivalent to NOLOCK
}
if ($lockMode == \Doctrine\DBAL\LockMode::PESSIMISTIC_READ) {
$tableHint = ' WITH (READCOMMITTED)';
if ($lockMode == LockMode::PESSIMISTIC_READ) {
return $fromClause . ' WITH (READCOMMITTED)';
}
if ($lockMode == \Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE) {
$tableHint = ' WITH (SERIALIZABLE)'; // equivalent to HOLDLOCK
if ($lockMode == LockMode::PESSIMISTIC_WRITE) {
return $fromClause . ' WITH (SERIALIZABLE)'; // equivalent to HOLDLOCK
}
return $fromClause . $tableHint;
return $fromClause;
}
/**
......
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