Fix oracle LISTAGG

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-01-03 17:26:15 +01:00 committed by Vitor Mattos
parent 43fa2d5c8c
commit e3e73a12ef
No known key found for this signature in database
GPG key ID: B7AB4B76A7CA7318

View file

@ -76,7 +76,7 @@ class OCIFunctionBuilder extends FunctionBuilder {
public function groupConcat($expr, ?string $separator = ','): IQueryFunction {
$orderByClause = ' WITHIN GROUP(ORDER BY NULL)';
if (is_null($separator)) {
return new QueryFunction('LISTAGG(' . $this->helper->quoteColumnName($expr) . $orderByClause . ')');
return new QueryFunction('LISTAGG(' . $this->helper->quoteColumnName($expr) . ')' . $orderByClause);
}
return new QueryFunction('LISTAGG(' . $this->helper->quoteColumnName($expr) . ", '$separator')$orderByClause");
}