summaryrefslogtreecommitdiffstats
path: root/lib/public/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/db.php')
-rw-r--r--lib/public/db.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/public/db.php b/lib/public/db.php
index 49f0a091716..02d0f6ddef4 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
+ * @since 4.5.0
*/
class DB {
/**
@@ -50,6 +51,7 @@ class DB {
* @return \OC_DB_StatementWrapper prepared SQL query
*
* SQL query via Doctrine prepare(), needs to be execute()'d!
+ * @since 4.5.0
*/
static public function prepare( $query, $limit=null, $offset=null ) {
return(\OC_DB::prepare($query, $limit, $offset));
@@ -64,6 +66,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
+ * @since 5.0.0 - parameter $compare was added in 8.1.0
*
*/
public static function insertIfNotExist($table, $input, array $compare = null) {
@@ -79,6 +82,7 @@ class DB {
*
* Call this method right after the insert command or other functions may
* cause trouble!
+ * @since 4.5.0
*/
public static function insertid($table=null) {
return(\OC_DB::insertid($table));
@@ -86,6 +90,7 @@ class DB {
/**
* Start a transaction
+ * @since 4.5.0
*/
public static function beginTransaction() {
\OC_DB::beginTransaction();
@@ -93,6 +98,7 @@ class DB {
/**
* Commit the database changes done during a transaction that is in progress
+ * @since 4.5.0
*/
public static function commit() {
\OC_DB::commit();
@@ -100,6 +106,7 @@ class DB {
/**
* Rollback the database changes done during a transaction that is in progress
+ * @since 8.0.0
*/
public static function rollback() {
\OC_DB::rollback();
@@ -109,6 +116,7 @@ class DB {
* Check if a result is an error, works with Doctrine
* @param mixed $result
* @return bool
+ * @since 4.5.0
*/
public static function isError($result) {
return(\OC_DB::isError($result));
@@ -119,6 +127,7 @@ class DB {
* works with DoctrineException
* @param mixed $error
* @return string
+ * @since 6.0.0
*/
public static function getErrorMessage($error) {
return(\OC_DB::getErrorMessage($error));