]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Storage/Database.php
Merge pull request #10860 from nupplaphil/feat/depository_profilefield
[friendica.git] / src / Model / Storage / Database.php
index 9edfe2170897f6d08b832eaa06c572e518380467..7b90d878909221d8f2ac59d48e990c8cd0f51f08 100644 (file)
@@ -29,7 +29,7 @@ use Friendica\Database\Database as DBA;
  *
  * This class manage data stored in database table.
  */
-class Database implements ISelectableStorage
+class Database implements IWritableStorage
 {
        const NAME = 'Database';
 
@@ -101,7 +101,7 @@ class Database implements ISelectableStorage
        public function delete(string $reference)
        {
                try {
-                       if (!$this->dba->delete('storage', ['id' => $reference])) {
+                       if (!$this->dba->delete('storage', ['id' => $reference]) || $this->dba->affectedRows() === 0) {
                                throw new ReferenceStorageException(sprintf('Database storage failed to delete %s', $reference));
                        }
                } catch (Exception $exception) {
@@ -113,22 +113,6 @@ class Database implements ISelectableStorage
                }
        }
 
-       /**
-        * @inheritDoc
-        */
-       public function getOptions(): array
-       {
-               return [];
-       }
-
-       /**
-        * @inheritDoc
-        */
-       public function saveOptions(array $data): array
-       {
-               return [];
-       }
-
        /**
         * @inheritDoc
         */