MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / getNote

Function getNote

app/src/sqlite/note.ts:220–235  ·  view source on GitHub ↗
(noteId: NoteId)

Source from the content-addressed store, hash-verified

218 })
219 },
220 async getNote(noteId: NoteId) {
221 const noteDbId = toLDbId(noteId)
222 const remoteNotes = await ky
223 .selectFrom('remoteNote')
224 .selectAll()
225 .where('localId', '=', noteDbId)
226 .execute()
227 const note = await ky
228 .selectFrom('note')
229 .selectAll('note')
230 .innerJoin('template', 'note.templateId', 'template.id')
231 .select('template.fields as template_fields')
232 .where('note.id', '=', noteDbId)
233 .executeTakeFirst()
234 return note == null ? null : noteEntityToDomain(note, remoteNotes)
235 },
236 async getNotesByIds(noteIds: NoteId[]) {
237 const noteDbIds = noteIds.map(toLDbId)
238 const remoteNotes = await ky

Callers

nothing calls this directly

Calls 2

toLDbIdFunction · 0.90
noteEntityToDomainFunction · 0.90

Tested by

no test coverage detected