Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
use OC\DB\QueryBuilder\QuoteHelper;
use OCP\DB\QueryBuilder\IExpressionBuilder;
use OCP\DB\QueryBuilder\ILiteral;
use OCP\DB\QueryBuilder\IParameter;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\QueryBuilder\IQueryFunction;
use OCP\IDBConnection;
Expand Down Expand Up @@ -278,7 +279,7 @@ public function isNotNull($x) {
/**
* Creates a LIKE() comparison expression with the given arguments.
*
* @param string $x Field in string format to be inspected by LIKE() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x Field in string format to be inspected by LIKE() comparison.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be done on some other functions too, but well one after the other

* @param mixed $y Argument to be used in LIKE() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
Expand Down Expand Up @@ -309,7 +310,7 @@ public function iLike($x, $y, $type = null) {
/**
* Creates a NOT LIKE() comparison expression with the given arguments.
*
* @param string $x Field in string format to be inspected by NOT LIKE() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x Field in string format to be inspected by NOT LIKE() comparison.
* @param mixed $y Argument to be used in NOT LIKE() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
Expand All @@ -325,8 +326,8 @@ public function notLike($x, $y, $type = null) {
/**
* Creates a IN () comparison expression with the given arguments.
*
* @param string $x The field in string format to be inspected by IN() comparison.
* @param string|array $y The placeholder or the array of values to be used by IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x The field in string format to be inspected by IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string|array $y The placeholder or the array of values to be used by IN() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
Expand All @@ -341,8 +342,8 @@ public function in($x, $y, $type = null) {
/**
* Creates a NOT IN () comparison expression with the given arguments.
*
* @param string $x The field in string format to be inspected by NOT IN() comparison.
* @param string|array $y The placeholder or the array of values to be used by NOT IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x The field in string format to be inspected by NOT IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string|array $y The placeholder or the array of values to be used by NOT IN() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
Expand Down
7 changes: 4 additions & 3 deletions lib/private/DB/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
use OC\DB\QueryBuilder\FunctionBuilder\PgSqlFunctionBuilder;
use OC\DB\QueryBuilder\FunctionBuilder\SqliteFunctionBuilder;
use OC\SystemConfig;
use OCP\DB\QueryBuilder\ILiteral;
use OCP\DB\QueryBuilder\IParameter;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\DB\QueryBuilder\IQueryFunction;
Expand Down Expand Up @@ -695,7 +696,7 @@ public function rightJoin($fromAlias, $join, $alias, $condition = null) {
* </code>
*
* @param string $key The column to set.
* @param IParameter|string $value The value, expression, placeholder, etc.
* @param ILiteral|IParameter|IQueryFunction|string $value The value, expression, placeholder, etc.
*
* @return $this This QueryBuilder instance.
*/
Expand Down Expand Up @@ -868,14 +869,14 @@ public function addGroupBy(...$groupBys) {
* </code>
*
* @param string $column The column into which the value should be inserted.
* @param string $value The value that should be inserted into the column.
* @param IParameter|string $value The value that should be inserted into the column.
*
* @return $this This QueryBuilder instance.
*/
public function setValue($column, $value) {
$this->queryBuilder->setValue(
$this->helper->quoteColumnName($column),
$value
(string) $value
);

return $this;
Expand Down
12 changes: 6 additions & 6 deletions lib/public/DB/QueryBuilder/IExpressionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function isNotNull($x);
/**
* Creates a LIKE() comparison expression with the given arguments.
*
* @param string $x Field in string format to be inspected by LIKE() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x Field in string format to be inspected by LIKE() comparison.
* @param mixed $y Argument to be used in LIKE() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
Expand All @@ -257,7 +257,7 @@ public function like($x, $y, $type = null);
/**
* Creates a NOT LIKE() comparison expression with the given arguments.
*
* @param string $x Field in string format to be inspected by NOT LIKE() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x Field in string format to be inspected by NOT LIKE() comparison.
* @param mixed $y Argument to be used in NOT LIKE() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
Expand All @@ -283,8 +283,8 @@ public function iLike($x, $y, $type = null);
/**
* Creates a IN () comparison expression with the given arguments.
*
* @param string $x The field in string format to be inspected by IN() comparison.
* @param string|array $y The placeholder or the array of values to be used by IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x The field in string format to be inspected by IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string|array $y The placeholder or the array of values to be used by IN() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
Expand All @@ -296,8 +296,8 @@ public function in($x, $y, $type = null);
/**
* Creates a NOT IN () comparison expression with the given arguments.
*
* @param string $x The field in string format to be inspected by NOT IN() comparison.
* @param string|array $y The placeholder or the array of values to be used by NOT IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string $x The field in string format to be inspected by NOT IN() comparison.
* @param ILiteral|IParameter|IQueryFunction|string|array $y The placeholder or the array of values to be used by NOT IN() comparison.
* @param mixed|null $type one of the IQueryBuilder::PARAM_* constants
* required when comparing text fields for oci compatibility
*
Expand Down
4 changes: 2 additions & 2 deletions lib/public/DB/QueryBuilder/IQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ public function rightJoin($fromAlias, $join, $alias, $condition = null);
* </code>
*
* @param string $key The column to set.
* @param IParameter|string $value The value, expression, placeholder, etc.
* @param ILiteral|IParameter|IQueryFunction|string $value The value, expression, placeholder, etc.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
Expand Down Expand Up @@ -651,7 +651,7 @@ public function addGroupBy(...$groupBy);
* </code>
*
* @param string $column The column into which the value should be inserted.
* @param string $value The value that should be inserted into the column.
* @param IParameter|string $value The value that should be inserted into the column.
*
* @return $this This QueryBuilder instance.
* @since 8.2.0
Expand Down