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/NativeQuery.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/NativeQuery.php')
| -rw-r--r-- | vendor/doctrine/orm/src/NativeQuery.php | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/vendor/doctrine/orm/src/NativeQuery.php b/vendor/doctrine/orm/src/NativeQuery.php deleted file mode 100644 index 6cee0e8..0000000 --- a/vendor/doctrine/orm/src/NativeQuery.php +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\ORM; | ||
| 6 | |||
| 7 | use Doctrine\DBAL\Result; | ||
| 8 | use Doctrine\ORM\Query\ParameterTypeInferer; | ||
| 9 | |||
| 10 | use function array_values; | ||
| 11 | use function is_int; | ||
| 12 | use function key; | ||
| 13 | use function ksort; | ||
| 14 | |||
| 15 | /** | ||
| 16 | * Represents a native SQL query. | ||
| 17 | * | ||
| 18 | * @final | ||
| 19 | */ | ||
| 20 | class NativeQuery extends AbstractQuery | ||
| 21 | { | ||
| 22 | private string $sql; | ||
| 23 | |||
| 24 | /** @return $this */ | ||
| 25 | public function setSQL(string $sql): self | ||
| 26 | { | ||
| 27 | $this->sql = $sql; | ||
| 28 | |||
| 29 | return $this; | ||
| 30 | } | ||
| 31 | |||
| 32 | public function getSQL(): string | ||
| 33 | { | ||
| 34 | return $this->sql; | ||
| 35 | } | ||
| 36 | |||
| 37 | protected function _doExecute(): Result|int | ||
| 38 | { | ||
| 39 | $parameters = []; | ||
| 40 | $types = []; | ||
| 41 | |||
| 42 | foreach ($this->getParameters() as $parameter) { | ||
| 43 | $name = $parameter->getName(); | ||
| 44 | $value = $this->processParameterValue($parameter->getValue()); | ||
| 45 | $type = $parameter->getValue() === $value | ||
| 46 | ? $parameter->getType() | ||
| 47 | : ParameterTypeInferer::inferType($value); | ||
| 48 | |||
| 49 | $parameters[$name] = $value; | ||
| 50 | $types[$name] = $type; | ||
| 51 | } | ||
| 52 | |||
| 53 | if ($parameters && is_int(key($parameters))) { | ||
| 54 | ksort($parameters); | ||
| 55 | ksort($types); | ||
| 56 | |||
| 57 | $parameters = array_values($parameters); | ||
| 58 | $types = array_values($types); | ||
| 59 | } | ||
| 60 | |||
| 61 | return $this->em->getConnection()->executeQuery( | ||
| 62 | $this->sql, | ||
| 63 | $parameters, | ||
| 64 | $types, | ||
| 65 | $this->queryCacheProfile, | ||
| 66 | ); | ||
| 67 | } | ||
| 68 | } | ||
