diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/notestorage.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/notestorage.php b/lib/notestorage.php index c665903..fb68030 100644 --- a/lib/notestorage.php +++ b/lib/notestorage.php @@ -190,6 +190,22 @@ class NoteStorage } /** + * Delete synchronization data for the given user. + * + * @param SyncData $syncdata Synchronization data object + * + * @return void + */ + public function deleteSyncData() + { + \OC_DB::executeAudited( + 'DELETE FROM `*PREFIX*grauphel_syncdata`' + . ' WHERE `syncdata_user` = ?', + array($this->username) + ); + } + + /** * Load a note from the storage. * * @param string $guid Note identifier @@ -281,6 +297,20 @@ class NoteStorage } /** + * Delete all notes from storage. + * + * @return void + */ + public function deleteAll() + { + \OC_DB::executeAudited( + 'DELETE FROM `*PREFIX*grauphel_notes`' + . ' WHERE `note_user` = ?', + array($this->username) + ); + } + + /** * Load notes for the given user in short form. * Optionally only those changed after $since revision * |
