diff options
| author | polo <ordipolo@gmx.fr> | 2026-10-18 00:08:23 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-10-18 00:10:03 +0200 |
| commit | 05e38eadbeb3de19e5b26003c2b401e00bb71df4 (patch) | |
| tree | cf48350b69cfce92de6f3a0e03eb0876931c7077 /vendor/doctrine/orm/src/Utility/LockSqlHelper.php | |
| parent | 32843e50aa981f190bdb4fbc9adbeacc06fdf775 (diff) | |
| download | AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.gz AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.tar.bz2 AppliGestionPHP-05e38eadbeb3de19e5b26003c2b401e00bb71df4.zip | |
sortie de vendor du dépôt, oubli dans config-template.ini
Diffstat (limited to 'vendor/doctrine/orm/src/Utility/LockSqlHelper.php')
| -rw-r--r-- | vendor/doctrine/orm/src/Utility/LockSqlHelper.php | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/vendor/doctrine/orm/src/Utility/LockSqlHelper.php b/vendor/doctrine/orm/src/Utility/LockSqlHelper.php deleted file mode 100644 index 7d135eb..0000000 --- a/vendor/doctrine/orm/src/Utility/LockSqlHelper.php +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\ORM\Utility; | ||
| 6 | |||
| 7 | use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; | ||
| 8 | use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
| 9 | use Doctrine\DBAL\Platforms\DB2Platform; | ||
| 10 | use Doctrine\DBAL\Platforms\PostgreSQLPlatform; | ||
| 11 | use Doctrine\DBAL\Platforms\SQLitePlatform; | ||
| 12 | use Doctrine\DBAL\Platforms\SQLServerPlatform; | ||
| 13 | |||
| 14 | /** @internal */ | ||
| 15 | trait LockSqlHelper | ||
| 16 | { | ||
| 17 | private function getReadLockSQL(AbstractPlatform $platform): string | ||
| 18 | { | ||
| 19 | return match (true) { | ||
| 20 | $platform instanceof AbstractMySQLPlatform => 'LOCK IN SHARE MODE', | ||
| 21 | $platform instanceof PostgreSQLPlatform => 'FOR SHARE', | ||
| 22 | default => $this->getWriteLockSQL($platform), | ||
| 23 | }; | ||
| 24 | } | ||
| 25 | |||
| 26 | private function getWriteLockSQL(AbstractPlatform $platform): string | ||
| 27 | { | ||
| 28 | return match (true) { | ||
| 29 | $platform instanceof DB2Platform => 'WITH RR USE AND KEEP UPDATE LOCKS', | ||
| 30 | $platform instanceof SQLitePlatform, | ||
| 31 | $platform instanceof SQLServerPlatform => '', | ||
| 32 | default => 'FOR UPDATE', | ||
| 33 | }; | ||
| 34 | } | ||
| 35 | } | ||
