Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mautic.corals.io/vendor/doctrine/orm/src/Utility/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mautic.corals.io/vendor/doctrine/orm/src/Utility/LockSqlHelper.php
<?php

declare(strict_types=1);

namespace Doctrine\ORM\Utility;

use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\DB2Platform;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Platforms\SQLServerPlatform;

/** @internal */
trait LockSqlHelper
{
    private function getReadLockSQL(AbstractPlatform $platform): string
    {
        if ($platform instanceof AbstractMySQLPlatform || $platform instanceof MySQLPlatform) {
            return 'LOCK IN SHARE MODE';
        }

        if ($platform instanceof PostgreSQLPlatform) {
            return 'FOR SHARE';
        }

        return $this->getWriteLockSQL($platform);
    }

    private function getWriteLockSQL(AbstractPlatform $platform): string
    {
        if ($platform instanceof DB2Platform) {
            return 'WITH RR USE AND KEEP UPDATE LOCKS';
        }

        if ($platform instanceof SqlitePlatform) {
            return '';
        }

        if ($platform instanceof SQLServerPlatform) {
            return '';
        }

        return 'FOR UPDATE';
    }
}

Spamworldpro Mini