autocomplete for attribute names, issue #31

This commit is contained in:
azivner
2018-02-04 19:27:27 -05:00
parent bc4aa3e40a
commit a3b31fab54
6 changed files with 47 additions and 12 deletions

View File

@@ -5,6 +5,8 @@ const utils = require('./utils');
const sync_table = require('./sync_table');
const Repository = require('./repository');
const BUILTIN_ATTRIBUTES = [ 'run_on_startup', 'disable_versioning' ];
async function getNoteAttributeMap(noteId) {
return await sql.getMap(`SELECT name, value FROM attributes WHERE noteId = ?`, [noteId]);
}
@@ -64,5 +66,6 @@ module.exports = {
getNotesWithAttribute,
getNoteWithAttribute,
getNoteIdsWithAttribute,
createAttribute
createAttribute,
BUILTIN_ATTRIBUTES
};