diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-02-15 16:36:20 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-03-03 10:44:09 +0100 |
commit | 4bdf9f5849b4a9b1fd7bc98d8d60528f388b0d15 (patch) | |
tree | 87cefc863c5f9aff36d394c7a60eb28a4bcf9e49 /lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php | |
parent | a1be5f33af7e65a80b2e39d7c28c727c6f3ef6fe (diff) | |
download | nextcloud-server-4bdf9f5849b4a9b1fd7bc98d8d60528f388b0d15.tar.gz nextcloud-server-4bdf9f5849b4a9b1fd7bc98d8d60528f388b0d15.zip |
Type the experssionbuilders
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php')
-rw-r--r-- | lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php index 141a93ff75a..3e8cdd698b4 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/PgSqlExpressionBuilder.php @@ -26,6 +26,7 @@ namespace OC\DB\QueryBuilder\ExpressionBuilder; use OC\DB\QueryBuilder\QueryFunction; use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\DB\QueryBuilder\IQueryFunction; class PgSqlExpressionBuilder extends ExpressionBuilder { @@ -34,9 +35,9 @@ class PgSqlExpressionBuilder extends ExpressionBuilder { * * @param string $column * @param mixed $type One of IQueryBuilder::PARAM_* - * @return string + * @return IQueryFunction */ - public function castColumn($column, $type) { + public function castColumn($column, $type): IQueryFunction { switch ($type) { case IQueryBuilder::PARAM_INT: return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS INT)'); @@ -50,7 +51,7 @@ class PgSqlExpressionBuilder extends ExpressionBuilder { /** * @inheritdoc */ - public function iLike($x, $y, $type = null) { + public function iLike($x, $y, $type = null): string { $x = $this->helper->quoteColumnName($x); $y = $this->helper->quoteColumnName($y); return $this->expressionBuilder->comparison($x, 'ILIKE', $y); |