summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-01-17 11:58:50 +0100
committerVitor Mattos <vitor@php.rio>2022-01-21 08:39:39 -0300
commitd850dc02207769ef13897867a11083e420f115c4 (patch)
treec8fc5e666c8e1b49609d6d01042c695acb73ceae /lib/private/DB
parent189f9f96ce8a93e228acc5821099d8e870576292 (diff)
downloadnextcloud-server-d850dc02207769ef13897867a11083e420f115c4.tar.gz
nextcloud-server-d850dc02207769ef13897867a11083e420f115c4.zip
Remove order from groupConcat as it is not working everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php2
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php4
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php2
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php2
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
index ba59f42ce5d..03630ea14a3 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/FunctionBuilder.php
@@ -59,7 +59,7 @@ class FunctionBuilder implements IFunctionBuilder {
return new QueryFunction(sprintf('CONCAT(%s)', implode(', ', $list)));
}
- public function groupConcat($expr, ?string $separator = ',', ?string $orderBy = null): IQueryFunction {
+ public function groupConcat($expr, ?string $separator = ','): IQueryFunction {
$separator = $this->connection->quote($separator);
return new QueryFunction('GROUP_CONCAT(' . $this->helper->quoteColumnName($expr) . ' SEPARATOR ' . $separator . ')');
}
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
index 77f14a2dda4..43ecf599eba 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/OCIFunctionBuilder.php
@@ -82,8 +82,8 @@ class OCIFunctionBuilder extends FunctionBuilder {
return new QueryFunction(sprintf('(%s)', implode(' || ', $list)));
}
- public function groupConcat($expr, ?string $separator = ',', ?string $orderBy = 'NULL'): IQueryFunction {
- $orderByClause = ' WITHIN GROUP(ORDER BY ' . $orderBy . ')';
+ 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);
}
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php
index 3a1d9a56734..444f6aa83a4 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/PgSqlFunctionBuilder.php
@@ -37,7 +37,7 @@ class PgSqlFunctionBuilder extends FunctionBuilder {
return new QueryFunction(sprintf('(%s)', implode(' || ', $list)));
}
- public function groupConcat($expr, ?string $separator = ',', ?string $orderBy = null): IQueryFunction {
+ public function groupConcat($expr, ?string $separator = ','): IQueryFunction {
$castedExpression = $this->queryBuilder->expr()->castColumn($expr, IQueryBuilder::PARAM_STR);
if (is_null($separator)) {
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php
index cfcabc9eb1a..fe700075a82 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php
@@ -36,7 +36,7 @@ class SqliteFunctionBuilder extends FunctionBuilder {
return new QueryFunction(sprintf('(%s)', implode(' || ', $list)));
}
- public function groupConcat($expr, ?string $separator = ',', ?string $orderBy = null): IQueryFunction {
+ public function groupConcat($expr, ?string $separator = ','): IQueryFunction {
$separator = $this->connection->quote($separator);
return new QueryFunction('GROUP_CONCAT(' . $this->helper->quoteColumnName($expr) . ', ' . $separator . ')');
}