mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
split out note's content into separate entity, WIP
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const Note = require('../entities/note');
|
||||
const NoteContent = require('../entities/note_content');
|
||||
const NoteRevision = require('../entities/note_revision');
|
||||
const Link = require('../entities/link');
|
||||
const Branch = require('../entities/branch');
|
||||
@@ -12,6 +13,7 @@ const ENTITY_NAME_TO_ENTITY = {
|
||||
"attributes": Attribute,
|
||||
"branches": Branch,
|
||||
"notes": Note,
|
||||
"note_contents": NoteContent,
|
||||
"note_revisions": NoteRevision,
|
||||
"recent_notes": RecentNote,
|
||||
"options": Option,
|
||||
@@ -48,6 +50,9 @@ function createEntityFromRow(row) {
|
||||
else if (row.branchId) {
|
||||
entity = new Branch(row);
|
||||
}
|
||||
else if (row.noteContentId) {
|
||||
entity = new NoteContent(row);
|
||||
}
|
||||
else if (row.noteId) {
|
||||
entity = new Note(row);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user