Add brackets around concat statements so comparing the result works as intended
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
f1b7dbf46b
commit
12df8dd69f
|
@ -24,6 +24,6 @@ use OC\DB\QueryBuilder\QueryFunction;
|
|||
|
||||
class PgSqlFunctionBuilder extends FunctionBuilder {
|
||||
public function concat($x, $y) {
|
||||
return new QueryFunction($this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y));
|
||||
return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,6 @@ use OC\DB\QueryBuilder\QueryFunction;
|
|||
|
||||
class SqliteFunctionBuilder extends FunctionBuilder {
|
||||
public function concat($x, $y) {
|
||||
return new QueryFunction($this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y));
|
||||
return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue