added querying by relation's properties

This commit is contained in:
zadam
2020-05-23 12:27:44 +02:00
parent 3d12341ff1
commit 355ffd3d02
14 changed files with 120 additions and 29 deletions

View File

@@ -13,7 +13,7 @@ class AttributeExistsExp extends Expression {
this.prefixMatch = prefixMatch;
}
execute(noteSet) {
execute(inputNoteSet) {
const attrs = this.prefixMatch
? noteCache.findAttributesWithPrefix(this.attributeType, this.attributeName)
: noteCache.findAttributes(this.attributeType, this.attributeName);
@@ -23,7 +23,7 @@ class AttributeExistsExp extends Expression {
for (const attr of attrs) {
const note = attr.note;
if (noteSet.hasNoteId(note.noteId)) {
if (inputNoteSet.hasNoteId(note.noteId)) {
if (attr.isInheritable) {
resultNoteSet.addAll(note.subtreeNotesIncludingTemplated);
}