]> source.dussan.org Git - nextcloud-server.git/commitdiff
Hack around oracle for CLOB fields
authorJoas Schilling <nickvergessen@gmx.de>
Thu, 5 Jun 2014 10:19:48 +0000 (12:19 +0200)
committerJoas Schilling <nickvergessen@gmx.de>
Thu, 5 Jun 2014 10:19:48 +0000 (12:19 +0200)
lib/private/preferences.php

index f1de95a5e110ab7f55434258ae7bdfea845fb25b..0dc5b26810ad996dc3fc27589d2e4afce820fa71 100644 (file)
@@ -254,7 +254,15 @@ class Preferences {
 
                $query = 'SELECT `userid` '
                        . ' FROM `*PREFIX*preferences` '
-                       . ' WHERE `appid` = ? AND `configkey` = ? AND `configvalue` = ?';
+                       . ' WHERE `appid` = ? AND `configkey` = ? AND ';
+
+               if (\OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') {
+                       //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
+                       $query .= ' to_char(`configvalue`)= ?';
+               } else {
+                       $query .= ' `configvalue` = ?';
+               }
+
                $result = $this->conn->executeQuery($query, array($app, $key, $value));
 
                while ($row = $result->fetch()) {