optimizations and fixes

This commit is contained in:
zadam 2020-12-11 15:24:44 +01:00
parent be543737a9
commit 199d89c1a6
3 changed files with 3 additions and 3 deletions

View file

@ -22,7 +22,7 @@ function getNotesAndBranchesAndAttributes(noteIds) {
branches.prefix, branches.prefix,
branches.isExpanded branches.isExpanded
FROM param_list FROM param_list
JOIN branches ON param_list.paramId = branches.noteId OR param_list.paramId = branches.parentNoteId JOIN branches ON param_list.paramId = branches.parentNoteId
JOIN notes AS child ON child.noteId = branches.noteId JOIN notes AS child ON child.noteId = branches.noteId
WHERE branches.isDeleted = 0`); WHERE branches.isDeleted = 0`);

View file

@ -116,7 +116,7 @@ function fillAllEntityChanges() {
} }
module.exports = { module.exports = {
addNoteReorderingEntityChange: (parentNoteId, sourceId) => addEntityChange("note_reordering", parentNoteId, sourceId), addNoteReorderingEntityChange: (parentNoteId, sourceId) => addEntityChange("note_reordering", parentNoteId, '', sourceId),
moveEntityChangeToTop, moveEntityChangeToTop,
addEntityChange, addEntityChange,
fillAllEntityChanges, fillAllEntityChanges,

View file

@ -219,7 +219,7 @@ function wrap(query, func) {
log.info(`Slow recursive query took ${milliseconds}ms.`); log.info(`Slow recursive query took ${milliseconds}ms.`);
} }
else { else {
log.info(`Slow query took ${milliseconds}ms: ${query}`); log.info(`Slow query took ${milliseconds}ms: ${query.trim().replace(/\s+/g, " ")}`);
} }
} }