diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-04-19 00:20:09 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-04-20 13:15:45 +0200 |
commit | 0a594cd3a5554dcb518fd48978fad2d6a6546122 (patch) | |
tree | 4348222606373d338f66d3ff65f51dee86920764 /lib/public/db.php | |
parent | cdf82909b8225a885fbf92b78208fb1fe258853e (diff) | |
download | nextcloud-server-0a594cd3a5554dcb518fd48978fad2d6a6546122.tar.gz nextcloud-server-0a594cd3a5554dcb518fd48978fad2d6a6546122.zip |
Add @deprecated to all methods with a proper method in \OCP
Diffstat (limited to 'lib/public/db.php')
-rw-r--r-- | lib/public/db.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/public/db.php b/lib/public/db.php index c188352d77b..44afc800abc 100644 --- a/lib/public/db.php +++ b/lib/public/db.php @@ -40,6 +40,7 @@ namespace OCP; /** * This class provides access to the internal database system. Use this class exlusively if you want to access databases + * @deprecated 8.1.0 use methods of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 4.5.0 */ class DB { @@ -51,6 +52,7 @@ class DB { * @return \OC_DB_StatementWrapper prepared SQL query * * SQL query via Doctrine prepare(), needs to be execute()'d! + * @deprecated 8.1.0 use prepare() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 4.5.0 */ static public function prepare( $query, $limit=null, $offset=null ) { @@ -66,6 +68,7 @@ class DB { * If this is null or an empty array, all keys of $input will be compared * @return int number of inserted rows * @throws \Doctrine\DBAL\DBALException + * @deprecated 8.1.0 use insertIfNotExist() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 5.0.0 - parameter $compare was added in 8.1.0 * */ @@ -82,6 +85,7 @@ class DB { * * Call this method right after the insert command or other functions may * cause trouble! + * @deprecated 8.1.0 use lastInsertId() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 4.5.0 */ public static function insertid($table=null) { @@ -90,6 +94,7 @@ class DB { /** * Start a transaction + * @deprecated 8.1.0 use beginTransaction() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 4.5.0 */ public static function beginTransaction() { @@ -98,6 +103,7 @@ class DB { /** * Commit the database changes done during a transaction that is in progress + * @deprecated 8.1.0 use commit() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 4.5.0 */ public static function commit() { @@ -106,6 +112,7 @@ class DB { /** * Rollback the database changes done during a transaction that is in progress + * @deprecated 8.1.0 use rollback() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 8.0.0 */ public static function rollback() { @@ -116,6 +123,7 @@ class DB { * Check if a result is an error, works with Doctrine * @param mixed $result * @return bool + * @deprecated 8.1.0 Doctrine returns false on error (and throws an exception) * @since 4.5.0 */ public static function isError($result) { @@ -126,6 +134,7 @@ class DB { * returns the error code and message as a string for logging * works with DoctrineException * @return string + * @deprecated 8.1.0 use getError() of \OCP\IDBConnection - \OC::$server->getDatabaseConnection() * @since 6.0.0 */ public static function getErrorMessage() { |