mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
fix(db): Fix Oracle JSON handling
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
4676b12a32
commit
60bfab2421
1 changed files with 26 additions and 0 deletions
|
|
@ -27,6 +27,32 @@ class OCIExpressionBuilder extends ExpressionBuilder {
|
|||
return parent::prepareColumn($column, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function eq($x, $y, $type = null): string {
|
||||
if ($type === IQueryBuilder::PARAM_JSON) {
|
||||
$x = $this->prepareColumn($x, $type);
|
||||
$y = $this->prepareColumn($y, $type);
|
||||
return (string)(new QueryFunction('JSON_EQUAL(' . $x . ',' . $y . ')'));
|
||||
}
|
||||
|
||||
return parent::eq($x, $y, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function neq($x, $y, $type = null): string {
|
||||
if ($type === IQueryBuilder::PARAM_JSON) {
|
||||
$x = $this->prepareColumn($x, $type);
|
||||
$y = $this->prepareColumn($y, $type);
|
||||
return (string)(new QueryFunction('NOT JSON_EQUAL(' . $x . ',' . $y . ')'));
|
||||
}
|
||||
|
||||
return parent::neq($x, $y, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue