added note.text + tests

This commit is contained in:
zadam
2020-08-19 23:00:51 +02:00
parent 5741b380f0
commit 5b1e229d7d
4 changed files with 134 additions and 107 deletions

View File

@@ -127,6 +127,17 @@ function getExpression(tokens, parsingContext, level = 0) {
return parseRelation(tokens[i].token);
}
if (tokens[i].token === 'text') {
if (tokens[i + 1].token !== '*=*') {
parsingContext.addError(`Virtual attribute "note.text" supports only *=* operator, instead given "${tokens[i + 1].token}" in ${context(i)}`);
return;
}
i += 2;
return getFulltext([tokens[i]], parsingContext);
}
if (PropertyComparisonExp.isProperty(tokens[i].token)) {
const propertyName = tokens[i].token;
const operator = tokens[i + 1].token;

View File

@@ -10,7 +10,7 @@ const PROP_MAPPING = {
"type": "type",
"mime": "mime",
"isprotected": "isProtected",
"isarhived": "isArchived",
"isarchived": "isArchived",
"datecreated": "dateCreated",
"datemodified": "dateModified",
"utcdatecreated": "utcDateCreated",