aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/DB
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-06-20 17:53:20 +0200
committerRobin Appelman <robin@icewind.nl>2022-08-16 12:07:09 +0200
commit9b52663a81ef4db0aa458ed6b34dfaab872e3243 (patch)
tree922780103997813d07b63f86c0964a7a75d66bb8 /lib/public/DB
parentcb97e8f15c75cc46e345ebfc79dcad1b9c48bd01 (diff)
downloadnextcloud-server-9b52663a81ef4db0aa458ed6b34dfaab872e3243.tar.gz
nextcloud-server-9b52663a81ef4db0aa458ed6b34dfaab872e3243.zip
Revert "make expression build return IQueryFunction instead of string"
This reverts commit 813b50ed428a8bc36817d19c84444e96dbe3b668. Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/DB')
-rw-r--r--lib/public/DB/QueryBuilder/IExpressionBuilder.php64
-rw-r--r--lib/public/DB/QueryBuilder/IQueryBuilder.php8
2 files changed, 36 insertions, 36 deletions
diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
index 8f7cd10dee5..53dc1fa5a7f 100644
--- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php
+++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php
@@ -107,7 +107,7 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
@@ -115,7 +115,7 @@ interface IExpressionBuilder {
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function comparison($x, string $operator, $y, $type = null): IQueryFunction;
+ public function comparison($x, string $operator, $y, $type = null): string;
/**
* Creates an equality comparison expression with the given arguments.
@@ -132,14 +132,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function eq($x, $y, $type = null): IQueryFunction;
+ public function eq($x, $y, $type = null): string;
/**
* Creates a non equality comparison expression with the given arguments.
@@ -155,14 +155,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function neq($x, $y, $type = null): IQueryFunction;
+ public function neq($x, $y, $type = null): string;
/**
* Creates a lower-than comparison expression with the given arguments.
@@ -178,14 +178,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function lt($x, $y, $type = null): IQueryFunction;
+ public function lt($x, $y, $type = null): string;
/**
* Creates a lower-than-equal comparison expression with the given arguments.
@@ -201,14 +201,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function lte($x, $y, $type = null): IQueryFunction;
+ public function lte($x, $y, $type = null): string;
/**
* Creates a greater-than comparison expression with the given arguments.
@@ -224,14 +224,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function gt($x, $y, $type = null): IQueryFunction;
+ public function gt($x, $y, $type = null): string;
/**
* Creates a greater-than-equal comparison expression with the given arguments.
@@ -247,38 +247,38 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function gte($x, $y, $type = null): IQueryFunction;
+ public function gte($x, $y, $type = null): string;
/**
* Creates an IS NULL expression with the given arguments.
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NULL.
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0
*
* @psalm-taint-sink sql $x
*/
- public function isNull($x): IQueryFunction;
+ public function isNull($x): string;
/**
* Creates an IS NOT NULL expression with the given arguments.
*
* @param string|ILiteral|IParameter|IQueryFunction $x The field in string format to be restricted by IS NOT NULL.
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0
*
* @psalm-taint-sink sql $x
*/
- public function isNotNull($x): IQueryFunction;
+ public function isNotNull($x): string;
/**
* Creates a LIKE() comparison expression with the given arguments.
@@ -288,14 +288,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function like($x, $y, $type = null): IQueryFunction;
+ public function like($x, $y, $type = null): string;
/**
* Creates a NOT LIKE() comparison expression with the given arguments.
@@ -305,14 +305,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function notLike($x, $y, $type = null): IQueryFunction;
+ public function notLike($x, $y, $type = null): string;
/**
* Creates a ILIKE() comparison expression with the given arguments.
@@ -322,14 +322,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function iLike($x, $y, $type = null): IQueryFunction;
+ public function iLike($x, $y, $type = null): string;
/**
* Creates a IN () comparison expression with the given arguments.
@@ -339,14 +339,14 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function in($x, $y, $type = null): IQueryFunction;
+ public function in($x, $y, $type = null): string;
/**
* Creates a NOT IN () comparison expression with the given arguments.
@@ -356,36 +356,36 @@ interface IExpressionBuilder {
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
- * @return IQueryFunction
+ * @return string
* @since 8.2.0 - Parameter $type was added in 9.0.0
*
* @psalm-taint-sink sql $x
* @psalm-taint-sink sql $y
* @psalm-taint-sink sql $type
*/
- public function notIn($x, $y, $type = null): IQueryFunction;
+ public function notIn($x, $y, $type = null): string;
/**
* 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 IQueryFunction
+ * @return string
* @since 13.0.0
*
* @psalm-taint-sink sql $x
*/
- public function emptyString($x): IQueryFunction;
+ public function emptyString($x): string;
/**
* 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 IQueryFunction
+ * @return string
* @since 13.0.0
*
* @psalm-taint-sink sql $x
*/
- public function nonEmptyString($x): IQueryFunction;
+ public function nonEmptyString($x): string;
/**
diff --git a/lib/public/DB/QueryBuilder/IQueryBuilder.php b/lib/public/DB/QueryBuilder/IQueryBuilder.php
index 446e9a00b4c..218b7d8cb2d 100644
--- a/lib/public/DB/QueryBuilder/IQueryBuilder.php
+++ b/lib/public/DB/QueryBuilder/IQueryBuilder.php
@@ -503,7 +503,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -528,7 +528,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -553,7 +553,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
@@ -578,7 +578,7 @@ interface IQueryBuilder {
* @param string $fromAlias The alias that points to a from clause.
* @param string $join The table name to join.
* @param string $alias The alias of the join table.
- * @param string|IQueryFunction|ICompositeExpression|null $condition The condition for the join.
+ * @param string|ICompositeExpression|null $condition The condition for the join.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0