Merge pull request #23935 from nextcloud/backport/23921/stable20

[stable20] Fix casting of integer and boolean on Oracle
This commit is contained in:
Morris Jobke 2020-11-06 22:24:31 +01:00 committed by GitHub
commit f8b550dab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -170,6 +170,10 @@ class OCIExpressionBuilder extends ExpressionBuilder {
$column = $this->helper->quoteColumnName($column);
return new QueryFunction('to_char(' . $column . ')');
}
if ($type === IQueryBuilder::PARAM_INT || $type === IQueryBuilder::PARAM_BOOL) {
$column = $this->helper->quoteColumnName($column);
return new QueryFunction('to_number(to_char(' . $column . '))');
}
return parent::castColumn($column, $type);
}