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:
Joas Schilling 2017-07-28 11:34:35 +02:00 committed by Lukas Reschke
parent 09e7d12157
commit 50912fb94f
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
2 changed files with 2 additions and 2 deletions

View File

@ -25,6 +25,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) . ')');
}
}

View File

@ -25,6 +25,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) . ')');
}
}