new "disable_inclusion" attribute

This commit is contained in:
azivner
2018-03-04 22:09:51 -05:00
parent 5c91e38dfe
commit 1c6fc9029f
4 changed files with 14 additions and 2 deletions

View File

@@ -47,6 +47,13 @@ class Note extends Entity {
return map;
}
async hasAttribute(name) {
const map = await this.getAttributeMap();
return map.hasOwnProperty(name);
}
// WARNING: this doesn't take into account the possibility to have multi-valued attributes!
async getAttribute(name) {
return this.repository.getEntity("SELECT * FROM attributes WHERE noteId = ? AND name = ?", [this.noteId, name]);
}