mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
cleanup of note (& revisions) content is now postponed and done 48 hours after deleting it. This makes it possible to correct user mistake without having to use a real backup
This commit is contained in:
@@ -104,6 +104,13 @@ class Note extends Entity {
|
||||
return await repository.getEntities(`SELECT * FROM attributes WHERE isDeleted = 0 AND noteId = ?`, [this.noteId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Attribute[]>} relations targetting this specific note
|
||||
*/
|
||||
async getTargetRelations() {
|
||||
return await repository.getEntities("SELECT * FROM attributes WHERE type = 'relation' AND isDeleted = 0 AND value = ?", [this.noteId]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} [name] - attribute name to filter
|
||||
* @returns {Promise<Attribute[]>} all note's attributes, including inherited ones
|
||||
|
||||
Reference in New Issue
Block a user