Skip to content

Commit

Permalink
Return $fromClause
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Nov 12, 2020
1 parent 93af9af commit c20d7da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php
Expand Up @@ -51,6 +51,9 @@ class SQLAnywherePlatform extends AbstractPlatform
public function appendLockHint($fromClause, $lockMode)
{
switch (true) {
case $lockMode === LockMode::NONE:
return $fromClause;

case $lockMode === LockMode::PESSIMISTIC_READ:
return $fromClause . ' WITH (UPDLOCK)';

Expand Down
3 changes: 3 additions & 0 deletions lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
Expand Up @@ -1573,6 +1573,9 @@ public function getForeignKeyReferentialActionSQL($action)
public function appendLockHint($fromClause, $lockMode)
{
switch (true) {
case $lockMode === LockMode::NONE:
return $fromClause;

case $lockMode === LockMode::PESSIMISTIC_READ:
return $fromClause . ' WITH (HOLDLOCK, ROWLOCK)';

Expand Down

0 comments on commit c20d7da

Please sign in to comment.