Description
Describe the bug
Error on using evaluate()
instead of eval()
from terminusdb-dashboard
To Reproduce
Attempt to call evaluate()
in chain-style from limit()
:
WOQL.limit(100).evaluate(WOQL.times(2,3), "v:result")
Return query-parser error:
SYNTAX ERROR: WOQL.limit(...).evaluate is not a function
But
WOQL.limit(100).eval(WOQL.times(2,3), "v:result")
Successful return:
[
{
"result": {
"@type": "xsd:decimal",
"@value": 6
}
}
]
Expected behavior
Return result:
[
{
"result": {
"@type": "xsd:decimal",
"@value": 6
}
}
]
Screenshots
...
Info (please complete the following information):
- terminus-server from docker-compose:
terminusdb/terminusdb-server:latest
Additional context
There is no mention of
evaluate
here:
https://github.com/terminusdb/terminusdb/blob/main/src/core/query/json_woql.plOr there:
https://github.com/search?q=repo%3Aterminusdb%2Fterminusdb%20evaluate&type=codeBut this is answer to why is
evaluate
was not found:
https://github.com/terminusdb/terminusdb-client-js/blob/main/lib/woql.js#L487because only
eval
WOQL-method is exist, andevaluate()
is only alias toeval()
See more about math operators in documentation:
https://terminusdb.com/docs/maths-based-queries-in-woql/