File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
storage/postgres/orm/sequelize Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -466,7 +466,7 @@ export default class NoteService {
466466 // If there is no ultimate parent, the provided noteId is the ultimate parent
467467 const rootNoteId = ultimateParent ?? noteId ;
468468
469- const notesRows = await this . noteRepository . getNoteDAOByNoteId ( rootNoteId ) ;
469+ const notesRows = await this . noteRepository . getNoteTreeByNoteId ( rootNoteId ) ;
470470
471471 const notesMap = new Map < NoteInternalId , NoteHierarchy > ( ) ;
472472
Original file line number Diff line number Diff line change @@ -92,11 +92,11 @@ export default class NoteRepository {
9292 }
9393
9494 /**
95- * Get note row by noteId
95+ * Get note and all of its children recursively
9696 * @param noteId - note id
97- * @returns an array of note rows
97+ * @returns an array of note DAO
9898 */
99- public async getNoteDAOByNoteId ( noteId : NoteInternalId ) : Promise < NoteDAO [ ] | null > {
100- return await this . storage . getNoteDAObyNoteId ( noteId ) ;
99+ public async getNoteTreeByNoteId ( noteId : NoteInternalId ) : Promise < NoteDAO [ ] | null > {
100+ return await this . storage . getNoteTreebyNoteId ( noteId ) ;
101101 }
102102}
Original file line number Diff line number Diff line change @@ -348,11 +348,11 @@ export default class NoteSequelizeStorage {
348348 }
349349
350350 /**
351- * Get note row by noteId
351+ * Get note and all of its children recursively
352352 * @param noteId - note id
353- * @returns an array of note rows
353+ * @returns an array of note DAO
354354 */
355- public async getNoteDAObyNoteId ( noteId : NoteInternalId ) : Promise < NoteDAO [ ] | null > {
355+ public async getNoteTreebyNoteId ( noteId : NoteInternalId ) : Promise < NoteDAO [ ] | null > {
356356 // Fetch all notes and relations in a recursive query
357357 const query = `
358358 WITH RECURSIVE note_tree AS (
You can’t perform that action at this time.
0 commit comments