diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-09 22:12:31 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-09 22:37:49 +0100 |
commit | 89be55a672afe0e09a33d4997ec10c0e833d4885 (patch) | |
tree | 2789f398177333df179ab73fc5ad9926edce39ec /lib/private/db.php | |
parent | b966a4eb17729230c461b9075143203bd50ed9e3 (diff) | |
download | nextcloud-server-89be55a672afe0e09a33d4997ec10c0e833d4885.tar.gz nextcloud-server-89be55a672afe0e09a33d4997ec10c0e833d4885.zip |
let insertIfNotExist() throw the native DBALException - no need to hide the real exception
Diffstat (limited to 'lib/private/db.php')
-rw-r--r-- | lib/private/db.php | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/private/db.php b/lib/private/db.php index 3993ae27748..c2654926696 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -20,8 +20,6 @@ * */ -define('MDB2_SCHEMA_DUMP_STRUCTURE', '1'); - /** * This class manages the access to the database. It basically is a wrapper for * Doctrine with some adaptions. @@ -40,8 +38,7 @@ class OC_DB { * * @return \OC\DB\MDB2SchemaManager */ - private static function getMDB2SchemaManager() - { + private static function getMDB2SchemaManager() { return new \OC\DB\MDB2SchemaManager(\OC::$server->getDatabaseConnection()); } @@ -167,16 +164,6 @@ class OC_DB { } /** - * Insert a row if a matching row doesn't exists. - * @param string $table The table to insert into in the form '*PREFIX*tableName' - * @param array $input An array of fieldname/value pairs - * @return boolean number of updated rows - */ - public static function insertIfNotExist($table, $input, $compare = null) { - return \OC::$server->getDatabaseConnection()->insertIfNotExist($table, $input, $compare); - } - - /** * Start a transaction */ public static function beginTransaction() { @@ -205,7 +192,7 @@ class OC_DB { * * TODO: write more documentation */ - public static function getDbStructure( $file, $mode = 0) { + public static function getDbStructure($file) { $schemaManager = self::getMDB2SchemaManager(); return $schemaManager->getDbStructure($file); } |