summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Internal/SQLResultCasing.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
committerpolo <ordipolo@gmx.fr>2024-08-13 23:45:21 +0200
commitbf6655a534a6775d30cafa67bd801276bda1d98d (patch)
treec6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/orm/src/Internal/SQLResultCasing.php
parent94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff)
downloadAppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/orm/src/Internal/SQLResultCasing.php')
-rw-r--r--vendor/doctrine/orm/src/Internal/SQLResultCasing.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Internal/SQLResultCasing.php b/vendor/doctrine/orm/src/Internal/SQLResultCasing.php
new file mode 100644
index 0000000..53b412e
--- /dev/null
+++ b/vendor/doctrine/orm/src/Internal/SQLResultCasing.php
@@ -0,0 +1,30 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\ORM\Internal;
6
7use Doctrine\DBAL\Platforms\AbstractPlatform;
8use Doctrine\DBAL\Platforms\DB2Platform;
9use Doctrine\DBAL\Platforms\OraclePlatform;
10use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
11
12use function strtolower;
13use function strtoupper;
14
15/** @internal */
16trait SQLResultCasing
17{
18 private function getSQLResultCasing(AbstractPlatform $platform, string $column): string
19 {
20 if ($platform instanceof DB2Platform || $platform instanceof OraclePlatform) {
21 return strtoupper($column);
22 }
23
24 if ($platform instanceof PostgreSQLPlatform) {
25 return strtolower($column);
26 }
27
28 return $column;
29 }
30}