mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
server-ts: Port services/search/expressions/parent_of
This commit is contained in:
parent
87708aa9c3
commit
0f7f0ceedc
@ -1,16 +1,19 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const Expression = require('./expression');
|
import Expression = require('./expression');
|
||||||
const NoteSet = require('../note_set');
|
import NoteSet = require('../note_set');
|
||||||
|
import SearchContext = require('../search_context');
|
||||||
|
|
||||||
class ParentOfExp extends Expression {
|
class ParentOfExp extends Expression {
|
||||||
constructor(subExpression) {
|
private subExpression: Expression;
|
||||||
|
|
||||||
|
constructor(subExpression: Expression) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.subExpression = subExpression;
|
this.subExpression = subExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(inputNoteSet, executionContext, searchContext) {
|
execute(inputNoteSet: NoteSet, executionContext: {}, searchContext: SearchContext) {
|
||||||
const subInputNoteSet = new NoteSet();
|
const subInputNoteSet = new NoteSet();
|
||||||
|
|
||||||
for (const note of inputNoteSet.notes) {
|
for (const note of inputNoteSet.notes) {
|
||||||
@ -33,4 +36,4 @@ class ParentOfExp extends Expression {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = ParentOfExp;
|
export = ParentOfExp;
|
@ -6,7 +6,7 @@ const OrExp = require('../expressions/or');
|
|||||||
const NotExp = require('../expressions/not');
|
const NotExp = require('../expressions/not');
|
||||||
const ChildOfExp = require('../expressions/child_of');
|
const ChildOfExp = require('../expressions/child_of');
|
||||||
const DescendantOfExp = require('../expressions/descendant_of');
|
const DescendantOfExp = require('../expressions/descendant_of');
|
||||||
const ParentOfExp = require('../expressions/parent_of.js');
|
const ParentOfExp = require('../expressions/parent_of');
|
||||||
const RelationWhereExp = require('../expressions/relation_where.js');
|
const RelationWhereExp = require('../expressions/relation_where.js');
|
||||||
const PropertyComparisonExp = require('../expressions/property_comparison.js');
|
const PropertyComparisonExp = require('../expressions/property_comparison.js');
|
||||||
const AttributeExistsExp = require('../expressions/attribute_exists');
|
const AttributeExistsExp = require('../expressions/attribute_exists');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user