Is your feature request related to a problem? Please describe.
@themost/query provides methods of calculating literal values by defining expressions like
"$expr": {
"$round": [
14567.5671,
2
]
}
DefaultValueListener and CalculatedValueListener use FunctionContext to calculate values by using native javascript closures but this operation should be improved and try to use @themost/query approach of calculating literal values.
Describe the solution you'd like
Use @themost/query for defining default or calculated values e.g.
{
"@id": "https://themost.io/schemas/dateModified",
"name": "dateModified",
"title": "dateModified",
"description": "The date on which this item was most recently modified.",
"type": "DateTime",
"readonly": true,
"calculation": {
"$expr": {
"$now": []
}
}
}
Is your feature request related to a problem? Please describe.
@themost/queryprovides methods of calculating literal values by defining expressions likeDefaultValueListenerandCalculatedValueListeneruseFunctionContextto calculate values by using native javascript closures but this operation should be improved and try to use@themost/queryapproach of calculating literal values.Describe the solution you'd like
Use
@themost/queryfor defining default or calculated values e.g.