script related changes

This commit is contained in:
azivner
2018-01-29 20:57:55 -05:00
parent 587f3d833e
commit 9a091408e3
4 changed files with 15 additions and 25 deletions

View File

@@ -18,11 +18,11 @@ async function getNotesWithAttribute(dataKey, name, value) {
let notes;
if (value !== undefined) {
notes = await sql.getRows(`SELECT notes.* FROM notes JOIN attributes USING(noteId)
notes = await sql.getEntities(`SELECT notes.* FROM notes JOIN attributes USING(noteId)
WHERE notes.isDeleted = 0 AND attributes.name = ? AND attributes.value = ?`, [name, value]);
}
else {
notes = await sql.getRows(`SELECT notes.* FROM notes JOIN attributes USING(noteId)
notes = await sql.getEntities(`SELECT notes.* FROM notes JOIN attributes USING(noteId)
WHERE notes.isDeleted = 0 AND attributes.name = ?`, [name]);
}