From 35a27de216d0a2765ce1357cf49983ddab78b1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 30 Oct 2021 00:25:25 +0200 Subject: [PATCH] update jsonb exists method by using question mark escaping --- .../Doctrine/DQL/JsonbExistsInArray.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php index 6c4eaa5c3..94e85048c 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonbExistsInArray.php @@ -1,7 +1,7 @@ + @author Julien Fastré */ class JsonbExistsInArray extends FunctionNode { private $expr1; private $expr2; - + public function getSql(SqlWalker $sqlWalker): string { return sprintf( - 'jsonb_exists(%s, %s)', + '%s ?? %s', $this->expr1->dispatch($sqlWalker), $sqlWalker->walkInputParameter($this->expr2) );