Fix casting to integer on Oracle

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-11-05 10:50:21 +01:00 committed by backportbot[bot]
parent 93211e7ded
commit 2b0b57d304
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) {
$column = $this->helper->quoteColumnName($column);
return new QueryFunction('to_number(to_char(' . $column . '))');
}
return parent::castColumn($column, $type);
}