ported migration code (no testing yet)

This commit is contained in:
azivner
2017-10-15 17:31:49 -04:00
parent e8655a84e2
commit d401866fbe
4 changed files with 96 additions and 16 deletions
+5
View File
@@ -40,6 +40,10 @@ async function execute(query, params = []) {
return await db.run(query, ...params);
}
async function executeScript(query) {
return await db.exec(query);
}
async function remove(tableName, noteId) {
return await execute("DELETE FROM " + tableName + " WHERE note_id = ?", [noteId]);
}
@@ -67,6 +71,7 @@ module.exports = {
getSingleResult,
getResults,
execute,
executeScript,
getOption,
setOption,
beginTransaction,