Skip to content

Commit f8b550d

Browse files
authored
Merge pull request #23935 from nextcloud/backport/23921/stable20
[stable20] Fix casting of integer and boolean on Oracle
2 parents a2c9915 + 990bb07 commit f8b550d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ public function castColumn($column, $type) {
170170
$column = $this->helper->quoteColumnName($column);
171171
return new QueryFunction('to_char(' . $column . ')');
172172
}
173+
if ($type === IQueryBuilder::PARAM_INT || $type === IQueryBuilder::PARAM_BOOL) {
174+
$column = $this->helper->quoteColumnName($column);
175+
return new QueryFunction('to_number(to_char(' . $column . '))');
176+
}
173177

174178
return parent::castColumn($column, $type);
175179
}

0 commit comments

Comments
 (0)