diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-05 10:50:21 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-06 08:38:08 +0100 |
commit | cfc35fa49aeb7b491bd4e89513b6f054e05ed458 (patch) | |
tree | 09604bebae2475b8fd41c1254458a35fbc7415bd /lib/private/DB | |
parent | 404785dd2bbddc644fd2064f83160904f770fc0d (diff) | |
download | nextcloud-server-cfc35fa49aeb7b491bd4e89513b6f054e05ed458.tar.gz nextcloud-server-cfc35fa49aeb7b491bd4e89513b6f054e05ed458.zip |
Fix casting to integer on Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/DB')
-rw-r--r-- | lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php index 2aa007dba04..e8e436ba5bd 100644 --- a/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php +++ b/lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php @@ -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); } |