return $this->noteFromRow($row);
}
+ /**
+ * Load a GUID of a note by the note title
+ *
+ * @param string $title Note title
+ *
+ * @return string GUID, NULL if note could not be found
+ */
+ public function loadGuidByTitle($title)
+ {
+ $row = \OC_DB::executeAudited(
+ 'SELECT note_guid FROM `*PREFIX*grauphel_notes`'
+ . ' WHERE `note_user` = ? AND `note_title` = ?',
+ array($this->username, $title)
+ )->fetchRow();
+
+ if ($row === false) {
+ return null;
+ }
+
+ return $row['note_guid'];
+ }
+
/**
* Save a note into storage.
*