saving image

This commit is contained in:
azivner
2018-11-08 11:08:16 +01:00
parent 21e952a7f0
commit d7afbe4059
9 changed files with 215 additions and 261 deletions

View File

@@ -480,13 +480,6 @@ class Note extends Entity {
return await repository.getEntities("SELECT * FROM note_revisions WHERE noteId = ?", [this.noteId]);
}
/**
* @returns {Promise<NoteImage[]>}
*/
async getNoteImages() {
return await repository.getEntities("SELECT * FROM note_images WHERE noteId = ? AND isDeleted = 0", [this.noteId]);
}
/**
* @returns {Promise<Link[]>}
*/
@@ -494,6 +487,15 @@ class Note extends Entity {
return await repository.getEntities("SELECT * FROM links WHERE noteId = ? AND isDeleted = 0", [this.noteId]);
}
/**
* Return all links from this note, including deleted ones.
*
* @returns {Promise<Link[]>}
*/
async getLinksWithDeleted() {
return await repository.getEntities("SELECT * FROM links WHERE noteId = ?", [this.noteId]);
}
/**
* @returns {Promise<Branch[]>}
*/