summaryrefslogtreecommitdiffstats
path: root/lib/private/DB
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-11-05 10:50:21 +0100
committerJoas Schilling <coding@schilljs.com>2020-11-06 08:38:08 +0100
commitcfc35fa49aeb7b491bd4e89513b6f054e05ed458 (patch)
tree09604bebae2475b8fd41c1254458a35fbc7415bd /lib/private/DB
parent404785dd2bbddc644fd2064f83160904f770fc0d (diff)
downloadnextcloud-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.php4
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);
}