mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	optimization of recursive CTE attribute query
This commit is contained in:
		| @@ -112,15 +112,15 @@ async function eraseNoteRevision(req) { | ||||
| } | ||||
|  | ||||
| async function getEditedNotesOnDate(req) { | ||||
|     const date = req.params.date; | ||||
|     const date = utils.sanitizeSql(req.params.date); | ||||
|  | ||||
|     const notes = await repository.getEntities(` | ||||
|         select distinct notes.* | ||||
|         from notes | ||||
|         left join note_revisions using (noteId) | ||||
|         where substr(notes.dateCreated, 0, 11) = ? | ||||
|            or substr(notes.dateModified, 0, 11) = ? | ||||
|            or substr(note_revisions.dateLastEdited, 0, 11) = ?`, [date, date, date]); | ||||
|         where notes.dateCreated LIKE '${date}%' | ||||
|            OR notes.dateModified LIKE '${date}%' | ||||
|            OR note_revisions.dateLastEdited LIKE '${date}%'`); | ||||
|  | ||||
|     for (const note of notes) { | ||||
|         const notePath = noteCacheService.getNotePath(note.noteId); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user