label service refactoring + rename of doInTransaction to transactional

This commit is contained in:
azivner
2018-04-07 13:03:16 -04:00
parent 39dc0f71b4
commit e378d9f645
15 changed files with 70 additions and 89 deletions

View File

@@ -77,7 +77,7 @@ async function loadSubTreeNoteIds(parentNoteId, subTreeNoteIds) {
}
async function sortNotesAlphabetically(parentNoteId) {
await sql.doInTransaction(async () => {
await sql.transactional(async () => {
const notes = await sql.getRows(`SELECT branchId, noteId, title, isProtected
FROM notes JOIN branches USING(noteId)
WHERE branches.isDeleted = 0 AND parentNoteId = ?`, [parentNoteId]);