summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-12-14 11:42:16 +0100
committerJoas Schilling <coding@schilljs.com>2016-12-14 11:42:16 +0100
commitbc3da3a8f56de496b35add326b7a9e12391b4e3d (patch)
treeb59ddfe18fb61b09b669f3bb3411a7f812236a52 /lib/public
parent03b648be13fa9be20babce0ccd8d4d97b008d569 (diff)
downloadnextcloud-server-bc3da3a8f56de496b35add326b7a9e12391b4e3d.tar.gz
nextcloud-server-bc3da3a8f56de496b35add326b7a9e12391b4e3d.zip
Remove IDb interface which was deprecated for 3 years already
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/AppFramework/Db/Mapper.php16
-rw-r--r--lib/public/IDb.php54
-rw-r--r--lib/public/IServerContainer.php8
3 files changed, 1 insertions, 77 deletions
diff --git a/lib/public/AppFramework/Db/Mapper.php b/lib/public/AppFramework/Db/Mapper.php
index aa3d9cdde37..611791a4364 100644
--- a/lib/public/AppFramework/Db/Mapper.php
+++ b/lib/public/AppFramework/Db/Mapper.php
@@ -28,7 +28,6 @@
namespace OCP\AppFramework\Db;
use OCP\IDBConnection;
-use OCP\IDb;
/**
@@ -229,11 +228,7 @@ abstract class Mapper {
* @since 7.0.0
*/
protected function execute($sql, array $params=[], $limit=null, $offset=null){
- if ($this->db instanceof IDb) {
- $query = $this->db->prepareQuery($sql, $limit, $offset);
- } else {
- $query = $this->db->prepare($sql, $limit, $offset);
- }
+ $query = $this->db->prepare($sql, $limit, $offset);
if ($this->isAssocArray($params)) {
foreach ($params as $key => $param) {
@@ -251,15 +246,6 @@ abstract class Mapper {
$result = $query->execute();
- // this is only for backwards compatibility reasons and can be removed
- // in owncloud 10. IDb returns a StatementWrapper from execute, PDO,
- // Doctrine and IDbConnection don't so this needs to be done in order
- // to stay backwards compatible for the things that rely on the
- // StatementWrapper being returned
- if ($result instanceof \OC_DB_StatementWrapper) {
- return $result;
- }
-
return $query;
}
diff --git a/lib/public/IDb.php b/lib/public/IDb.php
deleted file mode 100644
index bb04cf540fa..00000000000
--- a/lib/public/IDb.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Bernhard Posselt <dev@bernhard-posselt.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-namespace OCP;
-
-
-/**
- * Small Facade for being able to inject the database connection for tests
- * @since 7.0.0 - extends IDBConnection was added in 8.1.0
- */
-interface IDb extends IDBConnection {
-
-
- /**
- * Used to abstract the owncloud database access away
- * @param string $sql the sql query with ? placeholder for params
- * @param int $limit the maximum number of rows
- * @param int $offset from which row we want to start
- * @return \OC_DB_StatementWrapper prepared SQL query
- * @since 7.0.0
- */
- public function prepareQuery($sql, $limit=null, $offset=null);
-
-
- /**
- * Used to get the id of the just inserted element
- * @param string $tableName the name of the table where we inserted the item
- * @return int the id of the inserted element
- * @since 7.0.0
- */
- public function getInsertId($tableName);
-
-
-}
diff --git a/lib/public/IServerContainer.php b/lib/public/IServerContainer.php
index 354e39bd8f9..87628be01f7 100644
--- a/lib/public/IServerContainer.php
+++ b/lib/public/IServerContainer.php
@@ -192,14 +192,6 @@ interface IServerContainer {
public function getCredentialsManager();
/**
- * Returns an instance of the db facade
- * @deprecated 8.1.0 use getDatabaseConnection, will be removed in ownCloud 10
- * @return \OCP\IDb
- * @since 7.0.0
- */
- public function getDb();
-
- /**
* Returns the app config manager
*
* @return \OCP\IAppConfig