mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server-ts: Port services/search/expressions/expression
This commit is contained in:
parent
216f3f2c07
commit
ce60fc0c3a
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const log = require('../../log');
|
||||
const becca = require('../../../becca/becca');
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const TrueExp = require('./true.js');
|
||||
|
||||
class AndExp extends Expression {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
const NoteSet = require('../note_set');
|
||||
const becca = require('../../../becca/becca');
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
|
||||
class AttributeExistsExp extends Expression {
|
||||
constructor(attributeType, attributeName, prefixMatch) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
|
||||
class ChildOfExp extends Expression {
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const becca = require('../../../becca/becca');
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
class Expression {
|
||||
import NoteSet = require("../note_set");
|
||||
import SearchContext = require("../search_context");
|
||||
|
||||
abstract class Expression {
|
||||
name: string;
|
||||
|
||||
constructor() {
|
||||
this.name = this.constructor.name; // for DEBUG mode to have expression name as part of dumped JSON
|
||||
}
|
||||
@ -11,7 +16,7 @@ class Expression {
|
||||
* @param {SearchContext} searchContext
|
||||
* @returns {NoteSet}
|
||||
*/
|
||||
execute(inputNoteSet, executionContext, searchContext) {}
|
||||
abstract execute(inputNoteSet: NoteSet, executionContext: {}, searchContext: SearchContext): NoteSet;
|
||||
}
|
||||
|
||||
module.exports = Expression;
|
||||
export = Expression;
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const becca = require('../../../becca/becca');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
|
||||
class NotExp extends Expression {
|
||||
constructor(subExpression) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const log = require('../../log');
|
||||
const becca = require('../../../becca/becca');
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const becca = require('../../../becca/becca');
|
||||
const utils = require('../../utils');
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const TrueExp = require('./true.js');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
|
||||
class OrderByAndLimitExp extends Expression {
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
|
||||
class ParentOfExp extends Expression {
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const buildComparator = require('../services/build_comparator.js');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
const NoteSet = require('../note_set');
|
||||
const becca = require('../../../becca/becca');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
const Expression = require('./expression.js');
|
||||
const Expression = require('./expression');
|
||||
|
||||
class TrueExp extends Expression {
|
||||
execute(inputNoteSet, executionContext, searchContext) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user