mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 01:05:49 +01:00
note content refactoring, WIP
This commit is contained in:
@@ -42,6 +42,14 @@ async function getNote(noteId) {
|
||||
return await getEntity("SELECT * FROM notes WHERE noteId = ?", [noteId]);
|
||||
}
|
||||
|
||||
/** @returns {Promise<Note|null>} */
|
||||
async function getNoteWithContent(noteId) {
|
||||
const note = await getEntity("SELECT * FROM notes WHERE noteId = ?", [noteId]);
|
||||
await note.getNoteContent();
|
||||
|
||||
return note;
|
||||
}
|
||||
|
||||
/** @returns {Promise<NoteContent|null>} */
|
||||
async function getNoteContent(noteContentId) {
|
||||
return await getEntity("SELECT * FROM note_contents WHERE noteContentId = ?", [noteContentId]);
|
||||
@@ -126,6 +134,7 @@ module.exports = {
|
||||
getEntities,
|
||||
getEntity,
|
||||
getNote,
|
||||
getNoteWithContent,
|
||||
getNoteContent,
|
||||
getBranch,
|
||||
getAttribute,
|
||||
|
||||
Reference in New Issue
Block a user