aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php')
-rw-r--r--lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php
index 1067f8f0925..fe700075a82 100644
--- a/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php
+++ b/lib/private/DB/QueryBuilder/FunctionBuilder/SqliteFunctionBuilder.php
@@ -27,8 +27,13 @@ use OC\DB\QueryBuilder\QueryFunction;
use OCP\DB\QueryBuilder\IQueryFunction;
class SqliteFunctionBuilder extends FunctionBuilder {
- public function concat($x, $y): IQueryFunction {
- return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')');
+ public function concat($x, ...$expr): IQueryFunction {
+ $args = func_get_args();
+ $list = [];
+ foreach ($args as $item) {
+ $list[] = $this->helper->quoteColumnName($item);
+ }
+ return new QueryFunction(sprintf('(%s)', implode(' || ', $list)));
}
public function groupConcat($expr, ?string $separator = ','): IQueryFunction {