diff options
Diffstat (limited to 'lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php')
-rw-r--r-- | lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index f9b58d7d8ed..20d68b30b33 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -49,101 +49,101 @@ class OCIExpressionBuilder extends ExpressionBuilder { /** * @inheritdoc */ - public function comparison($x, string $operator, $y, $type = null): string { + public function comparison($x, string $operator, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->comparison($x, $operator, $y); + return new QueryFunction($this->expressionBuilder->comparison($x, $operator, $y)); } /** * @inheritdoc */ - public function eq($x, $y, $type = null): string { + public function eq($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->eq($x, $y); + return new QueryFunction($this->expressionBuilder->eq($x, $y)); } /** * @inheritdoc */ - public function neq($x, $y, $type = null): string { + public function neq($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->neq($x, $y); + return new QueryFunction($this->expressionBuilder->neq($x, $y)); } /** * @inheritdoc */ - public function lt($x, $y, $type = null): string { + public function lt($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->lt($x, $y); + return new QueryFunction($this->expressionBuilder->lt($x, $y)); } /** * @inheritdoc */ - public function lte($x, $y, $type = null): string { + public function lte($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->lte($x, $y); + return new QueryFunction($this->expressionBuilder->lte($x, $y)); } /** * @inheritdoc */ - public function gt($x, $y, $type = null): string { + public function gt($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->gt($x, $y); + return new QueryFunction($this->expressionBuilder->gt($x, $y)); } /** * @inheritdoc */ - public function gte($x, $y, $type = null): string { + public function gte($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->gte($x, $y); + return new QueryFunction($this->expressionBuilder->gte($x, $y)); } /** * @inheritdoc */ - public function in($x, $y, $type = null): string { + public function in($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->in($x, $y); + return new QueryFunction($this->expressionBuilder->in($x, $y)); } /** * @inheritdoc */ - public function notIn($x, $y, $type = null): string { + public function notIn($x, $y, $type = null): IQueryFunction { $x = $this->prepareColumn($x, $type); $y = $this->prepareColumn($y, $type); - return $this->expressionBuilder->notIn($x, $y); + return new QueryFunction($this->expressionBuilder->notIn($x, $y)); } /** * Creates a $x = '' statement, because Oracle needs a different check * * @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison. - * @return string + * @return IQueryFunction * @since 13.0.0 */ - public function emptyString($x): string { + public function emptyString($x): IQueryFunction { return $this->isNull($x); } @@ -151,10 +151,10 @@ class OCIExpressionBuilder extends ExpressionBuilder { * Creates a `$x <> ''` statement, because Oracle needs a different check * * @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be inspected by the comparison. - * @return string + * @return IQueryFunction * @since 13.0.0 */ - public function nonEmptyString($x): string { + public function nonEmptyString($x): IQueryFunction { return $this->isNotNull($x); } @@ -182,14 +182,14 @@ class OCIExpressionBuilder extends ExpressionBuilder { /** * @inheritdoc */ - public function like($x, $y, $type = null): string { - return parent::like($x, $y, $type) . " ESCAPE '\\'"; + public function like($x, $y, $type = null): IQueryFunction { + return new QueryFunction(parent::like($x, $y, $type) . " ESCAPE '\\'"); } /** * @inheritdoc */ - public function iLike($x, $y, $type = null): string { + public function iLike($x, $y, $type = null): IQueryFunction { return $this->like($this->functionBuilder->lower($x), $this->functionBuilder->lower($y)); } } |