diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-07-13 08:48:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-13 08:48:49 +0200 |
commit | 0031152de1c416932759d7ad6af445b895358734 (patch) | |
tree | 1dd2a53d08ec6941101992ef197e9693747c9f95 /lib | |
parent | 49554c657da7da495209a260008da84b8b94ee1e (diff) | |
parent | aae16c21e66847cd12cbf3084a102b923a7717ce (diff) | |
download | nextcloud-server-0031152de1c416932759d7ad6af445b895358734.tar.gz nextcloud-server-0031152de1c416932759d7ad6af445b895358734.zip |
Merge pull request #27852 from nextcloud/bugfix/noid/allow-casting-query-functions
Diffstat (limited to 'lib')
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php index a837c1ad752..c35afd0870b 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php @@ -425,11 +425,11 @@ class ExpressionBuilder implements IExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction */ - public function castColumn(string $column, $type): IQueryFunction { + public function castColumn($column, $type): IQueryFunction { return new QueryFunction( $this->helper->quoteColumnName($column) ); diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index 2a13562d00a..4cea234779e 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -161,11 +161,11 @@ class OCIExpressionBuilder extends ExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction */ - public function castColumn(string $column, $type): IQueryFunction { + public function castColumn($column, $type): IQueryFunction { if ($type === IQueryBuilder::PARAM_STR) { $column = $this->helper->quoteColumnName($column); return new QueryFunction('to_char(' . $column . ')'); diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php index 5df2f407411..4e0de5ef42b 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php @@ -33,7 +33,7 @@ class PgSqlExpressionBuilder extends ExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction */ diff --git a/lib/public/DB/QueryBuilder/IExpressionBuilder.php b/lib/public/DB/QueryBuilder/IExpressionBuilder.php index b3dbf564e35..77701240d51 100644 --- a/lib/public/DB/QueryBuilder/IExpressionBuilder.php +++ b/lib/public/DB/QueryBuilder/IExpressionBuilder.php @@ -431,7 +431,7 @@ interface IExpressionBuilder { /** * Returns a IQueryFunction that casts the column to the given type * - * @param string $column + * @param string|IQueryFunction $column * @param mixed $type One of IQueryBuilder::PARAM_* * @return IQueryFunction * @since 9.0.0 @@ -439,5 +439,5 @@ interface IExpressionBuilder { * @psalm-taint-sink sql $column * @psalm-taint-sink sql $type */ - public function castColumn(string $column, $type): IQueryFunction; + public function castColumn($column, $type): IQueryFunction; } |