]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix casting to integer on Oracle 23921/head
authorJoas Schilling <coding@schilljs.com>
Thu, 5 Nov 2020 09:50:21 +0000 (10:50 +0100)
committerJoas Schilling <coding@schilljs.com>
Fri, 6 Nov 2020 07:38:08 +0000 (08:38 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/DB/QueryBuilder/ExpressionBuilder/OCIExpressionBuilder.php

index 2aa007dba0496df647d91bc93de5763c94471205..e8e436ba5bd2cdfa8da3d8671481ca7cf3f7bebb 100644 (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);
        }